@hedia/recommendation-screen 2.1.75 → 2.2.0-alpha.1
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/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/{lib/typescript → dist/src}/RecommendationScreen.d.ts +68 -82
- package/dist/src/RecommendationScreen.js +522 -0
- package/dist/src/assets/assets/activity/Cyclist.png +0 -0
- package/dist/src/assets/assets/activity/Other.png +0 -0
- package/dist/src/assets/assets/activity/Runner.png +0 -0
- package/dist/src/assets/assets/activity/Swimmer.png +0 -0
- package/dist/src/assets/assets/activity/Walk.png +0 -0
- package/dist/src/assets/assets/fonts/Poppins-Bold.ttf +0 -0
- package/dist/src/assets/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/dist/src/assets/assets/icons/Edit.tsx +22 -0
- package/dist/src/assets/assets/icons/X.tsx +14 -0
- package/dist/src/assets/assets/mood/happy.png +0 -0
- package/dist/src/assets/assets/mood/happy_active.png +0 -0
- package/dist/src/assets/assets/mood/neutral.png +0 -0
- package/dist/src/assets/assets/mood/neutral_active.png +0 -0
- package/dist/src/assets/assets/mood/sad.png +0 -0
- package/dist/src/assets/assets/mood/sad_active.png +0 -0
- package/dist/src/assets/assets/mood/semi_happy.png +0 -0
- package/dist/src/assets/assets/mood/semi_happy_active.png +0 -0
- package/dist/src/assets/assets/mood/semi_sad.png +0 -0
- package/dist/src/assets/assets/mood/semi_sad_active.png +0 -0
- package/dist/src/assets/icons/Edit.d.ts +4 -0
- package/dist/src/assets/icons/Edit.js +7 -0
- package/dist/src/assets/icons/X.d.ts +4 -0
- package/dist/src/assets/icons/X.js +6 -0
- package/dist/src/components/ForecastInfoBar.d.ts +109 -0
- package/dist/src/components/ForecastInfoBar.js +138 -0
- package/dist/src/components/Header.d.ts +8 -0
- package/dist/src/components/Header.js +54 -0
- package/dist/src/components/Icon.d.ts +20 -0
- package/dist/src/components/Icon.js +43 -0
- package/{lib/typescript → dist/src}/components/InfoBars.d.ts +28 -14
- package/dist/src/components/InfoBars.js +128 -0
- package/{lib/typescript → dist/src}/components/InvisibleNumberInput.d.ts +3 -9
- package/dist/src/components/InvisibleNumberInput.js +121 -0
- package/dist/src/components/LimitationMessage.d.ts +14 -0
- package/dist/src/components/LimitationMessage.js +30 -0
- package/{lib/typescript → dist/src}/components/LineSeparator.d.ts +1 -6
- package/dist/src/components/LineSeparator.js +18 -0
- package/{lib/typescript → dist/src}/components/RecentInsulin.d.ts +1 -3
- package/dist/src/components/RecentInsulin.js +73 -0
- package/{lib/typescript → dist/src}/components/RecommendationModal.d.ts +63 -63
- package/dist/src/components/RecommendationModal.js +226 -0
- package/{lib/typescript → dist/src}/components/RecommendedCarbs.d.ts +0 -3
- package/dist/src/components/RecommendedCarbs.js +251 -0
- package/{lib/typescript → dist/src}/components/RecommendedInsulin.d.ts +1 -2
- package/dist/src/components/RecommendedInsulin.js +180 -0
- package/{lib/typescript → dist/src}/components/Remeasure.d.ts +15 -6
- package/dist/src/components/Remeasure.js +130 -0
- package/{lib/typescript/components/TransferToLogbook.d.ts → dist/src/components/SaveButton.d.ts} +2 -3
- package/dist/src/components/SaveButton.js +71 -0
- package/dist/src/components/TwoOptionModal.d.ts +136 -0
- package/dist/src/components/TwoOptionModal.js +141 -0
- package/{lib/typescript → dist/src}/components/activity/Activity.d.ts +2 -3
- package/dist/src/components/activity/Activity.js +84 -0
- package/{lib/typescript → dist/src}/components/activity/ActivityIcon.d.ts +7 -8
- package/dist/src/components/activity/ActivityIcon.js +58 -0
- package/{lib/typescript → dist/src}/components/activity/ActivityIntensity.d.ts +1 -2
- package/dist/src/components/activity/ActivityIntensity.js +58 -0
- package/{lib/typescript → dist/src}/components/mood/Emotion.d.ts +1 -2
- package/dist/src/components/mood/Emotion.js +64 -0
- package/{lib/typescript → dist/src}/components/mood/MoodIcon.d.ts +5 -5
- package/dist/src/components/mood/MoodIcon.js +63 -0
- package/dist/src/components/text/TextBold.d.ts +8 -0
- package/dist/src/components/text/TextBold.js +12 -0
- package/dist/src/components/text/TextRegular.d.ts +8 -0
- package/dist/src/components/text/TextRegular.js +12 -0
- package/dist/src/locale/da/messages.js +1 -0
- package/dist/src/locale/da/messages.po +353 -0
- package/dist/src/locale/de/messages.js +1 -0
- package/dist/src/locale/de/messages.po +353 -0
- package/dist/src/locale/en/messages.js +1 -0
- package/dist/src/locale/en/messages.po +353 -0
- package/dist/src/locale/es/messages.js +1 -0
- package/dist/src/locale/es/messages.po +353 -0
- package/dist/src/locale/fr/messages.js +1 -0
- package/dist/src/locale/fr/messages.po +353 -0
- package/dist/src/locale/i18nUtils.d.ts +18 -0
- package/dist/src/locale/i18nUtils.js +39 -0
- package/dist/src/locale/it/messages.js +1 -0
- package/dist/src/locale/it/messages.po +353 -0
- package/{lib/typescript → dist/src}/types/enum.d.ts +15 -22
- package/dist/src/types/enum.js +145 -0
- package/{lib/typescript → dist/src}/types/types.d.ts +0 -1
- package/dist/src/types/types.js +1 -0
- package/{lib/typescript → dist/src}/utils/AttentionMessages.d.ts +0 -1
- package/dist/src/utils/AttentionMessages.js +118 -0
- package/{lib/typescript → dist/src}/utils/Constants.d.ts +3 -18
- package/{lib/module → dist/src}/utils/Constants.js +21 -79
- package/{lib/typescript → dist/src}/utils/RecommendationError.d.ts +0 -1
- package/dist/src/utils/RecommendationError.js +63 -0
- package/{lib/typescript → dist/src}/utils/RecommendationUtils.d.ts +0 -1
- package/{lib/module → dist/src}/utils/RecommendationUtils.js +88 -90
- package/{lib/typescript → dist/src}/utils/Translations.d.ts +0 -1
- package/{lib/module → dist/src}/utils/Translations.js +5 -7
- package/{lib/typescript → dist/src}/utils/Utils.d.ts +1 -2
- package/dist/src/utils/Utils.js +141 -0
- package/{lib/typescript → dist/src}/utils/Validations.d.ts +1 -2
- package/{lib/module → dist/src}/utils/Validations.js +128 -156
- package/package.json +96 -109
- package/lib/commonjs/RecommendationScreen.js +0 -778
- package/lib/commonjs/RecommendationScreen.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/Close.js +0 -20
- package/lib/commonjs/assets/IconsSVG/Close.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/CloseOutlined.js +0 -28
- package/lib/commonjs/assets/IconsSVG/CloseOutlined.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/Edit.js +0 -23
- package/lib/commonjs/assets/IconsSVG/Edit.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/activity/Cycling.js +0 -43
- package/lib/commonjs/assets/IconsSVG/activity/Cycling.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/activity/Running.js +0 -33
- package/lib/commonjs/assets/IconsSVG/activity/Running.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/activity/Stretching.js +0 -33
- package/lib/commonjs/assets/IconsSVG/activity/Stretching.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/activity/Swimming.js +0 -48
- package/lib/commonjs/assets/IconsSVG/activity/Swimming.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/activity/Walking.js +0 -38
- package/lib/commonjs/assets/IconsSVG/activity/Walking.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/mood/Happy.js +0 -34
- package/lib/commonjs/assets/IconsSVG/mood/Happy.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/mood/Neutral.js +0 -34
- package/lib/commonjs/assets/IconsSVG/mood/Neutral.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/mood/Sad.js +0 -34
- package/lib/commonjs/assets/IconsSVG/mood/Sad.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/mood/SemiHappy.js +0 -34
- package/lib/commonjs/assets/IconsSVG/mood/SemiHappy.js.map +0 -1
- package/lib/commonjs/assets/IconsSVG/mood/SemiSad.js +0 -34
- package/lib/commonjs/assets/IconsSVG/mood/SemiSad.js.map +0 -1
- package/lib/commonjs/components/ExitModal.js +0 -124
- package/lib/commonjs/components/ExitModal.js.map +0 -1
- package/lib/commonjs/components/InfoBars.js +0 -123
- package/lib/commonjs/components/InfoBars.js.map +0 -1
- package/lib/commonjs/components/InvisibleNumberInput.js +0 -150
- package/lib/commonjs/components/InvisibleNumberInput.js.map +0 -1
- package/lib/commonjs/components/LineSeparator.js +0 -27
- package/lib/commonjs/components/LineSeparator.js.map +0 -1
- package/lib/commonjs/components/RecentInsulin.js +0 -105
- package/lib/commonjs/components/RecentInsulin.js.map +0 -1
- package/lib/commonjs/components/RecommendationModal.js +0 -302
- package/lib/commonjs/components/RecommendationModal.js.map +0 -1
- package/lib/commonjs/components/RecommendedCarbs.js +0 -289
- package/lib/commonjs/components/RecommendedCarbs.js.map +0 -1
- package/lib/commonjs/components/RecommendedInsulin.js +0 -209
- package/lib/commonjs/components/RecommendedInsulin.js.map +0 -1
- package/lib/commonjs/components/Remeasure.js +0 -131
- package/lib/commonjs/components/Remeasure.js.map +0 -1
- package/lib/commonjs/components/Text.js +0 -25
- package/lib/commonjs/components/Text.js.map +0 -1
- package/lib/commonjs/components/TimeoutModal.js +0 -113
- package/lib/commonjs/components/TimeoutModal.js.map +0 -1
- package/lib/commonjs/components/TransferToLogbook.js +0 -83
- package/lib/commonjs/components/TransferToLogbook.js.map +0 -1
- package/lib/commonjs/components/activity/Activity.js +0 -112
- package/lib/commonjs/components/activity/Activity.js.map +0 -1
- package/lib/commonjs/components/activity/ActivityIcon.js +0 -86
- package/lib/commonjs/components/activity/ActivityIcon.js.map +0 -1
- package/lib/commonjs/components/activity/ActivityIntensity.js +0 -65
- package/lib/commonjs/components/activity/ActivityIntensity.js.map +0 -1
- package/lib/commonjs/components/mood/Emotion.js +0 -86
- package/lib/commonjs/components/mood/Emotion.js.map +0 -1
- package/lib/commonjs/components/mood/MoodIcon.js +0 -107
- package/lib/commonjs/components/mood/MoodIcon.js.map +0 -1
- package/lib/commonjs/components/styles/fonts.js +0 -160
- package/lib/commonjs/components/styles/fonts.js.map +0 -1
- package/lib/commonjs/index.js +0 -21
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/locales/da/translations.json +0 -82
- package/lib/commonjs/locales/de/translations.json +0 -81
- package/lib/commonjs/locales/en/translations.json +0 -84
- package/lib/commonjs/locales/es/translations.json +0 -81
- package/lib/commonjs/locales/fr/translations.json +0 -81
- package/lib/commonjs/locales/it/translations.json +0 -81
- package/lib/commonjs/locales/translate.js +0 -63
- package/lib/commonjs/locales/translate.js.map +0 -1
- package/lib/commonjs/types/enum.js +0 -179
- package/lib/commonjs/types/enum.js.map +0 -1
- package/lib/commonjs/types/types.js +0 -6
- package/lib/commonjs/types/types.js.map +0 -1
- package/lib/commonjs/utils/AttentionMessages.js +0 -141
- package/lib/commonjs/utils/AttentionMessages.js.map +0 -1
- package/lib/commonjs/utils/Constants.js +0 -138
- package/lib/commonjs/utils/Constants.js.map +0 -1
- package/lib/commonjs/utils/RecommendationError.js +0 -116
- package/lib/commonjs/utils/RecommendationError.js.map +0 -1
- package/lib/commonjs/utils/RecommendationUtils.js +0 -212
- package/lib/commonjs/utils/RecommendationUtils.js.map +0 -1
- package/lib/commonjs/utils/Translations.js +0 -22
- package/lib/commonjs/utils/Translations.js.map +0 -1
- package/lib/commonjs/utils/Utils.js +0 -162
- package/lib/commonjs/utils/Utils.js.map +0 -1
- package/lib/commonjs/utils/Validations.js +0 -468
- package/lib/commonjs/utils/Validations.js.map +0 -1
- package/lib/module/RecommendationScreen.js +0 -768
- package/lib/module/RecommendationScreen.js.map +0 -1
- package/lib/module/assets/IconsSVG/Close.js +0 -11
- package/lib/module/assets/IconsSVG/Close.js.map +0 -1
- package/lib/module/assets/IconsSVG/CloseOutlined.js +0 -19
- package/lib/module/assets/IconsSVG/CloseOutlined.js.map +0 -1
- package/lib/module/assets/IconsSVG/Edit.js +0 -14
- package/lib/module/assets/IconsSVG/Edit.js.map +0 -1
- package/lib/module/assets/IconsSVG/activity/Cycling.js +0 -34
- package/lib/module/assets/IconsSVG/activity/Cycling.js.map +0 -1
- package/lib/module/assets/IconsSVG/activity/Running.js +0 -24
- package/lib/module/assets/IconsSVG/activity/Running.js.map +0 -1
- package/lib/module/assets/IconsSVG/activity/Stretching.js +0 -24
- package/lib/module/assets/IconsSVG/activity/Stretching.js.map +0 -1
- package/lib/module/assets/IconsSVG/activity/Swimming.js +0 -39
- package/lib/module/assets/IconsSVG/activity/Swimming.js.map +0 -1
- package/lib/module/assets/IconsSVG/activity/Walking.js +0 -29
- package/lib/module/assets/IconsSVG/activity/Walking.js.map +0 -1
- package/lib/module/assets/IconsSVG/mood/Happy.js +0 -25
- package/lib/module/assets/IconsSVG/mood/Happy.js.map +0 -1
- package/lib/module/assets/IconsSVG/mood/Neutral.js +0 -25
- package/lib/module/assets/IconsSVG/mood/Neutral.js.map +0 -1
- package/lib/module/assets/IconsSVG/mood/Sad.js +0 -25
- package/lib/module/assets/IconsSVG/mood/Sad.js.map +0 -1
- package/lib/module/assets/IconsSVG/mood/SemiHappy.js +0 -25
- package/lib/module/assets/IconsSVG/mood/SemiHappy.js.map +0 -1
- package/lib/module/assets/IconsSVG/mood/SemiSad.js +0 -25
- package/lib/module/assets/IconsSVG/mood/SemiSad.js.map +0 -1
- package/lib/module/components/ExitModal.js +0 -114
- package/lib/module/components/ExitModal.js.map +0 -1
- package/lib/module/components/InfoBars.js +0 -114
- package/lib/module/components/InfoBars.js.map +0 -1
- package/lib/module/components/InvisibleNumberInput.js +0 -142
- package/lib/module/components/InvisibleNumberInput.js.map +0 -1
- package/lib/module/components/LineSeparator.js +0 -19
- package/lib/module/components/LineSeparator.js.map +0 -1
- package/lib/module/components/RecentInsulin.js +0 -97
- package/lib/module/components/RecentInsulin.js.map +0 -1
- package/lib/module/components/RecommendationModal.js +0 -291
- package/lib/module/components/RecommendationModal.js.map +0 -1
- package/lib/module/components/RecommendedCarbs.js +0 -281
- package/lib/module/components/RecommendedCarbs.js.map +0 -1
- package/lib/module/components/RecommendedInsulin.js +0 -201
- package/lib/module/components/RecommendedInsulin.js.map +0 -1
- package/lib/module/components/Remeasure.js +0 -123
- package/lib/module/components/Remeasure.js.map +0 -1
- package/lib/module/components/Text.js +0 -16
- package/lib/module/components/Text.js.map +0 -1
- package/lib/module/components/TimeoutModal.js +0 -103
- package/lib/module/components/TimeoutModal.js.map +0 -1
- package/lib/module/components/TransferToLogbook.js +0 -75
- package/lib/module/components/TransferToLogbook.js.map +0 -1
- package/lib/module/components/activity/Activity.js +0 -104
- package/lib/module/components/activity/Activity.js.map +0 -1
- package/lib/module/components/activity/ActivityIcon.js +0 -78
- package/lib/module/components/activity/ActivityIcon.js.map +0 -1
- package/lib/module/components/activity/ActivityIntensity.js +0 -57
- package/lib/module/components/activity/ActivityIntensity.js.map +0 -1
- package/lib/module/components/mood/Emotion.js +0 -78
- package/lib/module/components/mood/Emotion.js.map +0 -1
- package/lib/module/components/mood/MoodIcon.js +0 -97
- package/lib/module/components/mood/MoodIcon.js.map +0 -1
- package/lib/module/components/styles/fonts.js +0 -152
- package/lib/module/components/styles/fonts.js.map +0 -1
- package/lib/module/index.js +0 -5
- package/lib/module/index.js.map +0 -1
- package/lib/module/locales/da/translations.json +0 -82
- package/lib/module/locales/de/translations.json +0 -81
- package/lib/module/locales/en/translations.json +0 -84
- package/lib/module/locales/es/translations.json +0 -81
- package/lib/module/locales/fr/translations.json +0 -81
- package/lib/module/locales/it/translations.json +0 -81
- package/lib/module/locales/translate.js +0 -55
- package/lib/module/locales/translate.js.map +0 -1
- package/lib/module/types/enum.js +0 -170
- package/lib/module/types/enum.js.map +0 -1
- package/lib/module/types/types.js +0 -2
- package/lib/module/types/types.js.map +0 -1
- package/lib/module/utils/AttentionMessages.js +0 -131
- package/lib/module/utils/AttentionMessages.js.map +0 -1
- package/lib/module/utils/Constants.js.map +0 -1
- package/lib/module/utils/RecommendationError.js +0 -87
- package/lib/module/utils/RecommendationError.js.map +0 -1
- package/lib/module/utils/RecommendationUtils.js.map +0 -1
- package/lib/module/utils/Translations.js.map +0 -1
- package/lib/module/utils/Utils.js +0 -155
- package/lib/module/utils/Utils.js.map +0 -1
- package/lib/module/utils/Validations.js.map +0 -1
- package/lib/typescript/RecommendationScreen.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/Close.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/Close.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/CloseOutlined.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/CloseOutlined.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/Edit.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/Edit.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/activity/Cycling.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/activity/Cycling.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/activity/Running.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/activity/Running.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/activity/Stretching.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/activity/Stretching.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/activity/Swimming.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/activity/Swimming.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/activity/Walking.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/activity/Walking.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/mood/Happy.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/mood/Happy.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/mood/Neutral.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/mood/Neutral.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/mood/Sad.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/mood/Sad.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/mood/SemiHappy.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/mood/SemiHappy.d.ts.map +0 -1
- package/lib/typescript/assets/IconsSVG/mood/SemiSad.d.ts +0 -5
- package/lib/typescript/assets/IconsSVG/mood/SemiSad.d.ts.map +0 -1
- package/lib/typescript/components/ExitModal.d.ts +0 -26
- package/lib/typescript/components/ExitModal.d.ts.map +0 -1
- package/lib/typescript/components/InfoBars.d.ts.map +0 -1
- package/lib/typescript/components/InvisibleNumberInput.d.ts.map +0 -1
- package/lib/typescript/components/LineSeparator.d.ts.map +0 -1
- package/lib/typescript/components/RecentInsulin.d.ts.map +0 -1
- package/lib/typescript/components/RecommendationModal.d.ts.map +0 -1
- package/lib/typescript/components/RecommendedCarbs.d.ts.map +0 -1
- package/lib/typescript/components/RecommendedInsulin.d.ts.map +0 -1
- package/lib/typescript/components/Remeasure.d.ts.map +0 -1
- package/lib/typescript/components/Text.d.ts +0 -14
- package/lib/typescript/components/Text.d.ts.map +0 -1
- package/lib/typescript/components/TimeoutModal.d.ts +0 -25
- package/lib/typescript/components/TimeoutModal.d.ts.map +0 -1
- package/lib/typescript/components/TransferToLogbook.d.ts.map +0 -1
- package/lib/typescript/components/activity/Activity.d.ts.map +0 -1
- package/lib/typescript/components/activity/ActivityIcon.d.ts.map +0 -1
- package/lib/typescript/components/activity/ActivityIntensity.d.ts.map +0 -1
- package/lib/typescript/components/mood/Emotion.d.ts.map +0 -1
- package/lib/typescript/components/mood/MoodIcon.d.ts.map +0 -1
- package/lib/typescript/components/styles/fonts.d.ts +0 -151
- package/lib/typescript/components/styles/fonts.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -5
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/locales/translate.d.ts +0 -20
- package/lib/typescript/locales/translate.d.ts.map +0 -1
- package/lib/typescript/types/enum.d.ts.map +0 -1
- package/lib/typescript/types/types.d.ts.map +0 -1
- package/lib/typescript/utils/AttentionMessages.d.ts.map +0 -1
- package/lib/typescript/utils/Constants.d.ts.map +0 -1
- package/lib/typescript/utils/RecommendationError.d.ts.map +0 -1
- package/lib/typescript/utils/RecommendationUtils.d.ts.map +0 -1
- package/lib/typescript/utils/Translations.d.ts.map +0 -1
- package/lib/typescript/utils/Utils.d.ts.map +0 -1
- package/lib/typescript/utils/Validations.d.ts.map +0 -1
- package/src/RecommendationScreen.tsx +0 -854
- package/src/assets/IconsSVG/Close.tsx +0 -13
- package/src/assets/IconsSVG/CloseOutlined.tsx +0 -23
- package/src/assets/IconsSVG/Edit.tsx +0 -16
- package/src/assets/IconsSVG/activity/Cycling.tsx +0 -41
- package/src/assets/IconsSVG/activity/Running.tsx +0 -29
- package/src/assets/IconsSVG/activity/Stretching.tsx +0 -29
- package/src/assets/IconsSVG/activity/Swimming.tsx +0 -47
- package/src/assets/IconsSVG/activity/Walking.tsx +0 -35
- package/src/assets/IconsSVG/mood/Happy.tsx +0 -30
- package/src/assets/IconsSVG/mood/Neutral.tsx +0 -30
- package/src/assets/IconsSVG/mood/Sad.tsx +0 -30
- package/src/assets/IconsSVG/mood/SemiHappy.tsx +0 -30
- package/src/assets/IconsSVG/mood/SemiSad.tsx +0 -30
- package/src/components/ExitModal.tsx +0 -134
- package/src/components/InfoBars.tsx +0 -122
- package/src/components/InvisibleNumberInput.tsx +0 -170
- package/src/components/LineSeparator.tsx +0 -29
- package/src/components/RecentInsulin.tsx +0 -109
- package/src/components/RecommendationModal.tsx +0 -319
- package/src/components/RecommendedCarbs.tsx +0 -303
- package/src/components/RecommendedInsulin.tsx +0 -220
- package/src/components/Remeasure.tsx +0 -135
- package/src/components/Text.tsx +0 -27
- package/src/components/TimeoutModal.tsx +0 -121
- package/src/components/TransferToLogbook.tsx +0 -92
- package/src/components/activity/Activity.tsx +0 -107
- package/src/components/activity/ActivityIcon.tsx +0 -77
- package/src/components/activity/ActivityIntensity.tsx +0 -67
- package/src/components/mood/Emotion.tsx +0 -97
- package/src/components/mood/MoodIcon.tsx +0 -91
- package/src/components/styles/fonts.ts +0 -151
- package/src/index.ts +0 -5
- package/src/locales/da/translations.json +0 -82
- package/src/locales/de/translations.json +0 -81
- package/src/locales/en/translations.json +0 -84
- package/src/locales/es/translations.json +0 -81
- package/src/locales/fr/translations.json +0 -81
- package/src/locales/it/translations.json +0 -81
- package/src/locales/translate.ts +0 -62
- package/src/types/enum.ts +0 -164
- package/src/types/types.ts +0 -19
- package/src/utils/AttentionMessages.ts +0 -167
- package/src/utils/Constants.ts +0 -77
- package/src/utils/RecommendationError.ts +0 -182
- package/src/utils/RecommendationUtils.ts +0 -232
- package/src/utils/Translations.ts +0 -17
- package/src/utils/Utils.ts +0 -156
- package/src/utils/Validations.ts +0 -490
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AppStateStatus } from "react-native";
|
|
3
3
|
import { BloodGlucoseUnit, BloodKetonesUnit, BolusCalculator, Languages, Logbook, UserSettings } from "@hedia/types";
|
|
4
|
-
import { ExitModalActions, TimeoutModalActions } from "./types/enum";
|
|
5
|
-
import { IActivityDisplayProps } from "./types/types";
|
|
6
4
|
import { RecommendationError } from "./utils/RecommendationError";
|
|
5
|
+
import { IActivityDisplayProps } from "./types/types";
|
|
7
6
|
/** Represents both a suggestion by HDA and an actual amount of either insulin or carbohydrates. */
|
|
8
7
|
export interface IResult {
|
|
9
8
|
/** The suggested amount (of insulin in units or carbohydrates in grams) */
|
|
@@ -15,7 +14,7 @@ export interface IRecommendationProps {
|
|
|
15
14
|
/** The blood glucose measurement unit that the user prefers. */
|
|
16
15
|
bloodGlucoseUnit: BloodGlucoseUnit;
|
|
17
16
|
/** The user’s preferred language. */
|
|
18
|
-
language:
|
|
17
|
+
language: Languages;
|
|
19
18
|
/** The user’s preferred default reminder time in hours when they enter carbohydrates or an activity. */
|
|
20
19
|
userReminder: number;
|
|
21
20
|
/** The values needed to make an insulin recommendation calculation. */
|
|
@@ -30,8 +29,10 @@ export interface IRecommendationProps {
|
|
|
30
29
|
latestLogbookFrom6Hours: Logbook.Types.ILogbookEntry | null;
|
|
31
30
|
/** The properties of the entered activity that are not used for making the calculation itself, but will be used on the recommendation screen. */
|
|
32
31
|
activityDisplayProps: IActivityDisplayProps | null;
|
|
33
|
-
/**
|
|
34
|
-
|
|
32
|
+
/** The forecasted glucose value to display. */
|
|
33
|
+
forecastedGlucose: string | null;
|
|
34
|
+
/** Forecasted time value to display. */
|
|
35
|
+
forecastedTime: string;
|
|
35
36
|
/**
|
|
36
37
|
* Callback function taking a single boolean argument and returning nothing.
|
|
37
38
|
* To be called when the user decides on a presented carbohydrate recommendation.
|
|
@@ -55,18 +56,6 @@ export interface IRecommendationProps {
|
|
|
55
56
|
* Should allow the user to enter when they injected insulin and how much.
|
|
56
57
|
*/
|
|
57
58
|
onRecentInsulinYes(): void;
|
|
58
|
-
/**
|
|
59
|
-
* Callback function without arguments or return values.
|
|
60
|
-
* To be called if the user taps “No” when asked if they have taken insulin recently.
|
|
61
|
-
* Should allow the user to enter when they injected insulin and how much.
|
|
62
|
-
*/
|
|
63
|
-
onRecentInsulinNo(): void;
|
|
64
|
-
/**
|
|
65
|
-
* Callback function without arguments or return values.
|
|
66
|
-
* To be called if the user taps “No” when asked if they have taken insulin recently, making the recommendation visible.
|
|
67
|
-
* Should display insulin recommendation.
|
|
68
|
-
*/
|
|
69
|
-
onRecommendationDisplayed(): void;
|
|
70
59
|
/**
|
|
71
60
|
* To be called when the “Transfer to Logbook” button is pressed.
|
|
72
61
|
* @param carbs The suggested and entered amount of carbohydrates.
|
|
@@ -81,26 +70,18 @@ export interface IRecommendationProps {
|
|
|
81
70
|
* To be called in case a serious issue with the validity of input data is detected.
|
|
82
71
|
* @param error The detected error.
|
|
83
72
|
*/
|
|
84
|
-
onError(error: RecommendationError
|
|
73
|
+
onError(error: RecommendationError): void;
|
|
74
|
+
/**
|
|
75
|
+
* Callback function taking a single argument of type boolean.
|
|
76
|
+
* To be called to hide the bottom navigation bar while displaying modal dialogs.
|
|
77
|
+
* @param toggle Showing (true) or hiding (false) the bottom navigation bar on the calculation flow screens.
|
|
78
|
+
*/
|
|
79
|
+
showBolusBar(toggle: boolean): void;
|
|
85
80
|
/**
|
|
86
81
|
* Callback function taking no arguments.
|
|
87
82
|
* To be called if the user chooses to restart the calculation.
|
|
88
83
|
*/
|
|
89
84
|
restartCalculation(): void;
|
|
90
|
-
/**
|
|
91
|
-
* Callback function without arguments or return values.
|
|
92
|
-
*/
|
|
93
|
-
hideExitModal(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Callback function without arguments or return values.
|
|
96
|
-
* To be called if the user taps "No, return to dahsboard" when asked after 15 mins of inactivity.
|
|
97
|
-
*/
|
|
98
|
-
onReturnToDashboard(): void;
|
|
99
|
-
/**
|
|
100
|
-
* Callback function without arguments or return values.
|
|
101
|
-
* To be called if the user taps “Yes, save to logbook” when asked after 15 mins of inactivity.
|
|
102
|
-
*/
|
|
103
|
-
onSaveToLogbook(): void;
|
|
104
85
|
}
|
|
105
86
|
interface IState {
|
|
106
87
|
/** The time in hours in hours until a reminder notification will be sent to the user. If 0 then no notification will be sent. */
|
|
@@ -133,14 +114,10 @@ interface IState {
|
|
|
133
114
|
* The exit modal prompts the user to consider saving the calculation to a logbook entry before closing the recommendation screen.
|
|
134
115
|
*/
|
|
135
116
|
showExitModal: boolean;
|
|
136
|
-
/** Keeps track of
|
|
137
|
-
|
|
138
|
-
/** Keeps track of whether or not only the limitation page of the recommendation modal should be visible. */
|
|
139
|
-
onlyShowLimitationMessage: boolean;
|
|
117
|
+
/** Keeps track of whether or not a message about insulin limitation should be displayed. */
|
|
118
|
+
showLimitationMessage: boolean;
|
|
140
119
|
/** Keeps track of whether or not a message about the recommendation being too old should be displayed. */
|
|
141
120
|
showTimeoutModal: boolean;
|
|
142
|
-
/** Keeps track of action taken in the timout modal. */
|
|
143
|
-
timeoutModalAction: TimeoutModalActions | null;
|
|
144
121
|
}
|
|
145
122
|
/**
|
|
146
123
|
* The RecommendationScreen is the React component that passes relevant inputs to the recommendation calculation module and presents
|
|
@@ -148,7 +125,7 @@ interface IState {
|
|
|
148
125
|
* The RecommendationScreen component accepts properties with the user’s settings/preferences and other inputs needed for calculating a recommendation.
|
|
149
126
|
* @noInheritDoc
|
|
150
127
|
*/
|
|
151
|
-
export
|
|
128
|
+
export default class RecommendationScreen extends React.Component<IRecommendationProps, IState> {
|
|
152
129
|
/** Reference to the timer that prompts the user to make a new calculation after 15 minutes. */
|
|
153
130
|
private readonly timer;
|
|
154
131
|
/**
|
|
@@ -174,6 +151,11 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
174
151
|
* It'll allow us to later remove the subscription.
|
|
175
152
|
*/
|
|
176
153
|
private appStateSubscription?;
|
|
154
|
+
/**
|
|
155
|
+
* A reference to the eventSubscription that'll be returned by BackHandler.addEventListener().
|
|
156
|
+
* It'll allow us to later remove the subscription.
|
|
157
|
+
*/
|
|
158
|
+
private backHandlerSubscription?;
|
|
177
159
|
/**
|
|
178
160
|
* Steps:
|
|
179
161
|
* 1. Call the super() method with the props.
|
|
@@ -183,7 +165,6 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
183
165
|
* - Set the language by using the language prop as argument for calling changeLanguage()
|
|
184
166
|
* - Unpack recentBoluses from the calculatorParams prop.
|
|
185
167
|
* - Use the calculatorParams prop as argument for calling calculateRecommendation() and unpack all of the resulting values.
|
|
186
|
-
* - Call the onRecommendationDisplayed() callback prop if the recommendation is visible
|
|
187
168
|
* - Copy the carbRecommendation to the suggestedCarbs member variable.
|
|
188
169
|
* - Set the following state variables:
|
|
189
170
|
* - Set remeasureTime to the return value from calling the getBGLevelRemeasurementReminder() method.
|
|
@@ -195,8 +176,7 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
195
176
|
* - Set activeInsulin to the estimation returned from the calculation result.
|
|
196
177
|
* - Set enteredCarbs, enteredInsulin, selectedMood to null.
|
|
197
178
|
* - Set recommendationModal to be true if wasLimited is true or if carbRecommendation after being rounded is truthy or if the return value from calling the getBGLevelAttentionMessage() method is truthy.
|
|
198
|
-
* - Set
|
|
199
|
-
* - Set showExitModal with the value of the showExitModal prop.
|
|
179
|
+
* - Set showExitModal, showLimitationMessage, showTimeoutModal to be false.
|
|
200
180
|
* 3. Start a 15 minute timer assigned to the timer member variable using the setTimeout() function. When the timer expires, call the showTimeoutModal() method.
|
|
201
181
|
* @param props The data required to initialise the Recommendation Screen
|
|
202
182
|
*/
|
|
@@ -219,14 +199,6 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
219
199
|
* 2. Remove the listener for app state changes that was set by the componentDidMount() method.
|
|
220
200
|
*/
|
|
221
201
|
componentWillUnmount(): void;
|
|
222
|
-
/**
|
|
223
|
-
* Called immediately after updating occurs. This method is not called for the initial render.
|
|
224
|
-
* Use this as an opportunity to operate on the DOM when the component has been updated.
|
|
225
|
-
* Steps:
|
|
226
|
-
* 1. If the showExitModal prop is true and it was false before, call the onExit() method.
|
|
227
|
-
* @param showExitModal The previous showExitModal props of the component.
|
|
228
|
-
*/
|
|
229
|
-
componentDidUpdate({ showExitModal }: IRecommendationProps): void;
|
|
230
202
|
/**
|
|
231
203
|
* Steps:
|
|
232
204
|
* 1. Evaluate a boolean called isOlderThan15Minutes to indicate whether the recommendationDate member variable represents a time more than 15 minutes ago.
|
|
@@ -236,7 +208,7 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
236
208
|
handleAppStateChange: (nextAppState: AppStateStatus) => void;
|
|
237
209
|
/**
|
|
238
210
|
* Steps:
|
|
239
|
-
* 1. Set the showTimeoutModal state variable to be true.
|
|
211
|
+
* 1. Set the showTimeoutModal state variable to be true. Use a callback function to call the showBolusBar prop callback function with false as argument when the state has been updated.
|
|
240
212
|
* */
|
|
241
213
|
showTimeoutModal: () => void;
|
|
242
214
|
/**
|
|
@@ -258,11 +230,19 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
258
230
|
*
|
|
259
231
|
* Steps:
|
|
260
232
|
* 1. If the insulin recommendation is being displayed (the isRecommendationDisplayed state variable is true):
|
|
261
|
-
* - Set the showExitModal state variable to true.
|
|
233
|
+
* - Set the showExitModal state variable to true. When the state has been updated, call the showBolusBar prop callback function with the inverse value of the showExitModal state variable as argument.
|
|
262
234
|
* 2. Else:
|
|
263
235
|
* - Call the exitCallback prop callback function.
|
|
264
236
|
*/
|
|
265
237
|
onExit: () => void;
|
|
238
|
+
/**
|
|
239
|
+
* Callback to be executed by the back handler listener.
|
|
240
|
+
*
|
|
241
|
+
* Steps:
|
|
242
|
+
* 1. Call the onExist method
|
|
243
|
+
* 2. Return true so that the default behaviour is overwritten.
|
|
244
|
+
*/
|
|
245
|
+
onBackHandlerPress: () => boolean;
|
|
266
246
|
/**
|
|
267
247
|
* Hide the modal that shows attention messages.
|
|
268
248
|
*
|
|
@@ -271,37 +251,28 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
271
251
|
*/
|
|
272
252
|
hideAttentionModal: () => void;
|
|
273
253
|
/**
|
|
274
|
-
*
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
* Handle presses on the close calculation button in the exit modal.
|
|
279
|
-
*/
|
|
280
|
-
onPressCloseExitModal: () => void;
|
|
281
|
-
/**
|
|
282
|
-
* Handle presses on the hide button in the exit modal.
|
|
283
|
-
*/
|
|
284
|
-
onPressHideExitModal: () => void;
|
|
285
|
-
/**
|
|
286
|
-
* Call the chosen modal action on the didHide modal callback .
|
|
287
|
-
*/
|
|
288
|
-
onExitModalDidHide: () => void;
|
|
289
|
-
/**
|
|
290
|
-
* Handle presses on the close calculation button in the timeout modal.
|
|
291
|
-
*/
|
|
292
|
-
onPressCloseCalculationTimeoutModal: () => void;
|
|
293
|
-
/**
|
|
294
|
-
* Handle presses on the restart calculation button in the timeout modal.
|
|
254
|
+
* Hide the modal that shows attention messages.
|
|
255
|
+
*
|
|
256
|
+
* Steps:
|
|
257
|
+
* 1. Set the showLimitationMessage state variable to false.
|
|
295
258
|
*/
|
|
296
|
-
|
|
259
|
+
hideLimitationMessage: () => void;
|
|
297
260
|
/**
|
|
298
|
-
*
|
|
261
|
+
* Hide the exit modal. To be used when the user closes the modal directly or in some way exits the recommendation screen.
|
|
262
|
+
*
|
|
263
|
+
* Steps:
|
|
264
|
+
* 1. Set the showExitModal state variable to false.
|
|
265
|
+
* When the state has been updated, call the showBolusBar prop callback function with the inverse value of the showExitModal state variable as argument.
|
|
299
266
|
*/
|
|
300
|
-
|
|
267
|
+
hideExitModal: () => void;
|
|
301
268
|
/**
|
|
302
|
-
*
|
|
269
|
+
* Hide the modal that warns the user that their recommendation is old.
|
|
270
|
+
*
|
|
271
|
+
* Steps:
|
|
272
|
+
* 1. Set the showTimeoutModal state variable to false.
|
|
273
|
+
* When the state has been updated, call the showBolusBar prop callback function with the inverse value of the showTimeoutModal state variable as argument.
|
|
303
274
|
*/
|
|
304
|
-
|
|
275
|
+
hideTimeoutModal: () => void;
|
|
305
276
|
/**
|
|
306
277
|
* Used as a callback function for the Remeasure component to update the state when the remeasure time slider’s value changes.
|
|
307
278
|
*
|
|
@@ -317,8 +288,7 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
317
288
|
*
|
|
318
289
|
* Steps:
|
|
319
290
|
* 1. Set the isRecommendationDisplayed state variable to be true.
|
|
320
|
-
* 2.
|
|
321
|
-
* 3. As a callback to the setState() method, define a new anonymous function that calls setTimeout() with a duration of 0 milliseconds.
|
|
291
|
+
* 2. As a callback to the setState() method, define a new anonymous function that calls setTimeout() with a duration of 0 milliseconds.
|
|
322
292
|
* When the time expires, call the scrollToEnd() method of the scrollView member, with the animated argument set to true.
|
|
323
293
|
* This ensures that the scroll event happens after all other events that get queued to happen at the same time,
|
|
324
294
|
* so all relevant elements are visible on the screen and the scroll happens reliably.
|
|
@@ -360,6 +330,22 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
360
330
|
* 2. Call the carbRecommendationAnswer() prop callback function with true as argument.
|
|
361
331
|
*/
|
|
362
332
|
acceptCarbRecommendation: () => void;
|
|
333
|
+
/**
|
|
334
|
+
* Handles what happens when the user hits the “close calculation”-button on the exit modal.
|
|
335
|
+
*
|
|
336
|
+
* Steps:
|
|
337
|
+
* 1. If the showExitModal state variable is true then call the hideExitModal() method. Otherwise, call the hideTimeoutModal() method
|
|
338
|
+
* 2. Call the closeCalculationCallback prop callback function.
|
|
339
|
+
*/
|
|
340
|
+
closeCalculation: () => void;
|
|
341
|
+
/**
|
|
342
|
+
* Close the current recommendation and start a new bolus calculation.
|
|
343
|
+
*
|
|
344
|
+
* Steps:
|
|
345
|
+
* 1. Call the hideTimeoutModal() method.
|
|
346
|
+
* 2. Call the restartCalculation prop callback function.
|
|
347
|
+
*/
|
|
348
|
+
restartCalculation: () => void;
|
|
363
349
|
/**
|
|
364
350
|
* Used as a callback function for the Emotion component to update the state when a mood icon is tapped.
|
|
365
351
|
*
|
|
@@ -384,7 +370,8 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
384
370
|
* 1. Unpack the enteredCarbs, enteredInsulin, insulinRecommendation, remeasureTime, and showExitModal state variables
|
|
385
371
|
* 2. Create an IResult object called carbs consisting of suggestedCarbs and enteredCarbs.
|
|
386
372
|
* 3. Create an IResult object called Insulin consisting of insulinRecommendation and enteredInsulin.
|
|
387
|
-
* 4.
|
|
373
|
+
* 4. If showExitModal is true then call the hideExitModal() method. otherwise call the hideTimeoutModal() method.
|
|
374
|
+
* 5. Call the transferToLogbook prop callback function with the following arguments:
|
|
388
375
|
* - Set the carbs argument to the carbs IResult object.
|
|
389
376
|
* - Set the insulin argument to the insulin IResult object.
|
|
390
377
|
* - Set the reminder argument to the remeasureTime state variable.
|
|
@@ -428,4 +415,3 @@ export declare class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
428
415
|
render(): JSX.Element;
|
|
429
416
|
}
|
|
430
417
|
export {};
|
|
431
|
-
//# sourceMappingURL=RecommendationScreen.d.ts.map
|