@hedia/recommendation-screen 1.1.2 → 1.2.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/.idea/codeStyles/Project.xml +8 -8
- package/.idea/workspace.xml +107 -71
- package/package.json +1 -1
- package/src/RecommendationScreen.d.ts +7 -2
- package/src/RecommendationScreen.jsx +30 -10
- package/src/RecommendationScreen.tsx +42 -12
- package/src/components/ExitModal.d.ts +11 -0
- package/src/components/ExitModal.jsx +87 -0
- package/src/components/ExitModal.tsx +85 -0
- package/src/components/Header.jsx +1 -1
- package/src/components/Header.tsx +1 -0
- package/src/components/InfoBars.d.ts +2 -0
- package/src/components/InfoBars.jsx +4 -4
- package/src/components/InfoBars.tsx +6 -6
- package/src/components/RecommendationModal.d.ts +180 -0
- package/src/components/{HediaRecommendationModal.jsx → RecommendationModal.jsx} +50 -47
- package/src/components/{HediaRecommendationModal.tsx → RecommendationModal.tsx} +48 -46
- package/src/locale/da/messages.js +1 -1
- package/src/locale/da/messages.po +81 -64
- package/src/locale/en/messages.js +1 -1
- package/src/locale/en/messages.po +73 -56
- package/src/utils/AttentionMessages.d.ts +1 -1
- package/src/utils/AttentionMessages.jsx +6 -5
- package/src/utils/AttentionMessages.tsx +6 -5
- package/src/utils/Constants.ts +1 -0
- package/src/utils/RecommendationError.jsx +22 -4
- package/src/utils/RecommendationError.tsx +5 -4
- package/App.jsx +0 -94
- package/src/components/HediaRecommendationModal.d.ts +0 -26
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
<component name="ProjectCodeStyleConfiguration">
|
|
2
2
|
<code_scheme name="Project" version="173">
|
|
3
3
|
<option name="LINE_SEPARATOR" value=" " />
|
|
4
|
-
<JSCodeStyleSettings version="0">
|
|
5
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
6
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
7
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
8
|
-
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
9
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
10
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
11
|
-
</JSCodeStyleSettings>
|
|
12
4
|
<DBN-PSQL>
|
|
13
5
|
<case-options enabled="true">
|
|
14
6
|
<option name="KEYWORD_CASE" value="lower" />
|
|
@@ -33,6 +25,14 @@
|
|
|
33
25
|
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
|
|
34
26
|
</formatting-settings>
|
|
35
27
|
</DBN-SQL>
|
|
28
|
+
<JSCodeStyleSettings version="0">
|
|
29
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
30
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
31
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
32
|
+
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
33
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
34
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
35
|
+
</JSCodeStyleSettings>
|
|
36
36
|
<TypeScriptCodeStyleSettings version="0">
|
|
37
37
|
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
38
38
|
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
package/.idea/workspace.xml
CHANGED
|
@@ -1,7 +1,36 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
|
+
<component name="AutoImportSettings">
|
|
4
|
+
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="BranchesTreeState">
|
|
7
|
+
<expand>
|
|
8
|
+
<path>
|
|
9
|
+
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
|
10
|
+
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
|
11
|
+
</path>
|
|
12
|
+
<path>
|
|
13
|
+
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
|
14
|
+
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
|
15
|
+
</path>
|
|
16
|
+
<path>
|
|
17
|
+
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
|
18
|
+
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
|
19
|
+
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
|
|
20
|
+
</path>
|
|
21
|
+
</expand>
|
|
22
|
+
<select>
|
|
23
|
+
<path>
|
|
24
|
+
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
|
25
|
+
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
|
26
|
+
<item name="BRANCH:recalculation" type="e8cecc67:BranchNodeDescriptor" />
|
|
27
|
+
</path>
|
|
28
|
+
</select>
|
|
29
|
+
</component>
|
|
3
30
|
<component name="ChangeListManager">
|
|
4
|
-
<list default="true" id="bceba75c-4c15-4bdc-9b41-023f63a30830" name="Default Changelist" comment=""
|
|
31
|
+
<list default="true" id="bceba75c-4c15-4bdc-9b41-023f63a30830" name="Default Changelist" comment="">
|
|
32
|
+
<change beforePath="$PROJECT_DIR$/src/components/InvisibleNumberInput.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/InvisibleNumberInput.tsx" afterDir="false" />
|
|
33
|
+
</list>
|
|
5
34
|
<option name="SHOW_DIALOG" value="false" />
|
|
6
35
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
7
36
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
@@ -17,6 +46,7 @@
|
|
|
17
46
|
<option name="showLibraryContents" value="true" />
|
|
18
47
|
</component>
|
|
19
48
|
<component name="PropertiesComponent">
|
|
49
|
+
<property name="ASKED_MARK_IGNORED_FILES_AS_EXCLUDED" value="true" />
|
|
20
50
|
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
|
21
51
|
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
|
22
52
|
<property name="TERMINAL_CUSTOM_COMMANDS_GOT_IT" value="true" />
|
|
@@ -36,6 +66,7 @@
|
|
|
36
66
|
<property name="run.prettier.on.save" value="true" />
|
|
37
67
|
<property name="settings.editor.selected.configurable" value="settings.javascript.prettier" />
|
|
38
68
|
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
|
|
69
|
+
<property name="vue.rearranger.settings.migration" value="true" />
|
|
39
70
|
</component>
|
|
40
71
|
<component name="RecentsManager">
|
|
41
72
|
<key name="CopyFile.RECENT_KEYS">
|
|
@@ -129,6 +160,16 @@
|
|
|
129
160
|
<workItem from="1597740771454" duration="22346000" />
|
|
130
161
|
<workItem from="1597909150337" duration="7043000" />
|
|
131
162
|
<workItem from="1598019682936" duration="792000" />
|
|
163
|
+
<workItem from="1598364310905" duration="450000" />
|
|
164
|
+
<workItem from="1598519875100" duration="8739000" />
|
|
165
|
+
<workItem from="1598549768243" duration="327000" />
|
|
166
|
+
<workItem from="1598599347013" duration="7546000" />
|
|
167
|
+
<workItem from="1598858637503" duration="10795000" />
|
|
168
|
+
<workItem from="1598949840662" duration="19791000" />
|
|
169
|
+
<workItem from="1599031274561" duration="12226000" />
|
|
170
|
+
<workItem from="1599119614705" duration="6081000" />
|
|
171
|
+
<workItem from="1599205746476" duration="8368000" />
|
|
172
|
+
<workItem from="1599465060245" duration="4106000" />
|
|
132
173
|
</task>
|
|
133
174
|
<servers />
|
|
134
175
|
</component>
|
|
@@ -137,59 +178,42 @@
|
|
|
137
178
|
<option name="exactExcludedFiles">
|
|
138
179
|
<list>
|
|
139
180
|
<option value="$PROJECT_DIR$/index.js" />
|
|
140
|
-
<option value="$PROJECT_DIR$/App.jsx" />
|
|
141
|
-
<option value="$PROJECT_DIR$/App.d.ts" />
|
|
142
|
-
<option value="$PROJECT_DIR$/index.d.ts" />
|
|
143
|
-
<option value="$PROJECT_DIR$/src/RecommendationScreen.d.ts" />
|
|
144
|
-
<option value="$PROJECT_DIR$/src/RecommendationScreen.jsx" />
|
|
145
|
-
<option value="$PROJECT_DIR$/src/types/enum.d.ts" />
|
|
146
|
-
<option value="$PROJECT_DIR$/src/types/enum.js" />
|
|
147
|
-
<option value="$PROJECT_DIR$/src/types/types.d.ts" />
|
|
148
|
-
<option value="$PROJECT_DIR$/src/types/types.js" />
|
|
149
|
-
<option value="$PROJECT_DIR$/src/utils/Validations.d.ts" />
|
|
150
|
-
<option value="$PROJECT_DIR$/src/utils/Utils.d.ts" />
|
|
151
|
-
<option value="$PROJECT_DIR$/src/utils/Utils.js" />
|
|
152
|
-
<option value="$PROJECT_DIR$/src/utils/RecommendationError.d.ts" />
|
|
153
|
-
<option value="$PROJECT_DIR$/src/utils/Constants.d.ts" />
|
|
154
|
-
<option value="$PROJECT_DIR$/src/utils/Validations.js" />
|
|
155
|
-
<option value="$PROJECT_DIR$/src/utils/Constants.js" />
|
|
156
|
-
<option value="$PROJECT_DIR$/src/utils/RecommendationError.js" />
|
|
157
|
-
<option value="$PROJECT_DIR$/src/locale/i18nUtils.js" />
|
|
158
|
-
<option value="$PROJECT_DIR$/src/locale/i18nUtils.d.ts" />
|
|
159
|
-
<option value="$PROJECT_DIR$/src/components/InfoBars.d.ts" />
|
|
160
|
-
<option value="$PROJECT_DIR$/src/components/InfoBars.jsx" />
|
|
161
|
-
<option value="$PROJECT_DIR$/src/components/Remeasure.jsx" />
|
|
162
|
-
<option value="$PROJECT_DIR$/src/components/TransferToLogbook.jsx" />
|
|
163
|
-
<option value="$PROJECT_DIR$/src/components/InvisibleNumberInput.jsx" />
|
|
164
|
-
<option value="$PROJECT_DIR$/src/components/InvisibleNumberInput.d.ts" />
|
|
165
|
-
<option value="$PROJECT_DIR$/src/components/RecommendedInsulin.jsx" />
|
|
166
|
-
<option value="$PROJECT_DIR$/src/components/Remeasure.d.ts" />
|
|
167
|
-
<option value="$PROJECT_DIR$/src/components/Header.d.ts" />
|
|
168
|
-
<option value="$PROJECT_DIR$/src/components/RecommendedCarbs.d.ts" />
|
|
169
|
-
<option value="$PROJECT_DIR$/src/components/RecentInsulin.jsx" />
|
|
170
|
-
<option value="$PROJECT_DIR$/src/components/Header.jsx" />
|
|
171
|
-
<option value="$PROJECT_DIR$/src/components/TransferToLogbook.d.ts" />
|
|
172
|
-
<option value="$PROJECT_DIR$/src/components/RecentInsulin.d.ts" />
|
|
173
|
-
<option value="$PROJECT_DIR$/src/components/RecommendedInsulin.d.ts" />
|
|
174
|
-
<option value="$PROJECT_DIR$/src/components/RecommendedCarbs.jsx" />
|
|
175
|
-
<option value="$PROJECT_DIR$/src/components/mood/MoodIcon.jsx" />
|
|
176
|
-
<option value="$PROJECT_DIR$/src/components/mood/Emotion.jsx" />
|
|
177
|
-
<option value="$PROJECT_DIR$/src/components/mood/MoodIcon.d.ts" />
|
|
178
|
-
<option value="$PROJECT_DIR$/src/components/mood/Emotion.d.ts" />
|
|
179
|
-
<option value="$PROJECT_DIR$/src/components/activity/ActivityIcon.d.ts" />
|
|
180
|
-
<option value="$PROJECT_DIR$/src/components/activity/Activity.d.ts" />
|
|
181
|
-
<option value="$PROJECT_DIR$/src/components/activity/ActivityIntensity.d.ts" />
|
|
182
|
-
<option value="$PROJECT_DIR$/src/components/activity/Activity.jsx" />
|
|
183
|
-
<option value="$PROJECT_DIR$/src/components/activity/ActivityIcon.jsx" />
|
|
184
|
-
<option value="$PROJECT_DIR$/src/components/activity/ActivityIntensity.jsx" />
|
|
185
181
|
</list>
|
|
186
182
|
</option>
|
|
187
183
|
</component>
|
|
184
|
+
<component name="Vcs.Log.Tabs.Properties">
|
|
185
|
+
<option name="TAB_STATES">
|
|
186
|
+
<map>
|
|
187
|
+
<entry key="MAIN">
|
|
188
|
+
<value>
|
|
189
|
+
<State>
|
|
190
|
+
<option name="FILTERS">
|
|
191
|
+
<map>
|
|
192
|
+
<entry key="branch">
|
|
193
|
+
<value>
|
|
194
|
+
<list>
|
|
195
|
+
<option value="recalculation" />
|
|
196
|
+
</list>
|
|
197
|
+
</value>
|
|
198
|
+
</entry>
|
|
199
|
+
</map>
|
|
200
|
+
</option>
|
|
201
|
+
</State>
|
|
202
|
+
</value>
|
|
203
|
+
</entry>
|
|
204
|
+
</map>
|
|
205
|
+
</option>
|
|
206
|
+
<option name="oldMeFiltersMigrated" value="true" />
|
|
207
|
+
</component>
|
|
188
208
|
<component name="WindowStateProjectService">
|
|
189
209
|
<state x="360" y="233" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1596109376244">
|
|
190
210
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
191
211
|
</state>
|
|
192
212
|
<state x="360" y="233" key="#com.intellij.execution.impl.EditConfigurationsDialog/-1920.-66.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1596109376244" />
|
|
213
|
+
<state x="2565" y="-159" key="#com.intellij.ide.util.MemberChooser" timestamp="1599035564109">
|
|
214
|
+
<screen x="1792" y="-410" width="1920" height="1057" />
|
|
215
|
+
</state>
|
|
216
|
+
<state x="2565" y="-159" key="#com.intellij.ide.util.MemberChooser/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1599035564109" />
|
|
193
217
|
<state x="663" y="429" key="#com.jetbrains.plugins.reactnative.ReactNativePackagerConfigurationEditor" timestamp="1596109375456">
|
|
194
218
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
195
219
|
</state>
|
|
@@ -198,48 +222,54 @@
|
|
|
198
222
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
199
223
|
</state>
|
|
200
224
|
<state x="226" y="61" key="CommitChangelistDialog2/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597746124626" />
|
|
201
|
-
<state x="
|
|
202
|
-
<screen x="
|
|
225
|
+
<state x="1792" y="-314" width="1920" height="865" key="DiffContextDialog" timestamp="1598603549140">
|
|
226
|
+
<screen x="1792" y="-410" width="1920" height="1057" />
|
|
203
227
|
</state>
|
|
204
228
|
<state x="100" y="123" width="1592" height="897" key="DiffContextDialog/-1920.-66.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1596107873347" />
|
|
205
229
|
<state x="0" y="123" width="1792" height="897" key="DiffContextDialog/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597747801467" />
|
|
206
230
|
<state x="0" y="123" width="1792" height="897" key="DiffContextDialog/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1597836504040" />
|
|
207
|
-
<state width="
|
|
231
|
+
<state x="1792" y="-314" width="1920" height="865" key="DiffContextDialog/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1598603549140" />
|
|
232
|
+
<state width="1276" height="270" key="GridCell.Tab.0.bottom" timestamp="1599230158300">
|
|
208
233
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
209
234
|
</state>
|
|
210
235
|
<state width="1750" height="261" key="GridCell.Tab.0.bottom/-1920.-66.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1596194051670" />
|
|
211
236
|
<state width="1878" height="249" key="GridCell.Tab.0.bottom/0.23.1792.1097@0.23.1792.1097" timestamp="1596482378171" />
|
|
212
237
|
<state width="1750" height="383" key="GridCell.Tab.0.bottom/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597945008184" />
|
|
213
|
-
<state width="
|
|
214
|
-
<state width="
|
|
215
|
-
<state width="
|
|
238
|
+
<state width="1678" height="367" key="GridCell.Tab.0.bottom/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1599152764316" />
|
|
239
|
+
<state width="1276" height="270" key="GridCell.Tab.0.bottom/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1599230158300" />
|
|
240
|
+
<state width="1878" height="259" key="GridCell.Tab.0.bottom/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1599060151002" />
|
|
241
|
+
<state width="1276" height="270" key="GridCell.Tab.0.center" timestamp="1599230158300">
|
|
216
242
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
217
243
|
</state>
|
|
218
244
|
<state width="1750" height="261" key="GridCell.Tab.0.center/-1920.-66.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1596194051669" />
|
|
219
245
|
<state width="1878" height="249" key="GridCell.Tab.0.center/0.23.1792.1097@0.23.1792.1097" timestamp="1596482378170" />
|
|
220
246
|
<state width="1750" height="383" key="GridCell.Tab.0.center/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597945008183" />
|
|
221
|
-
<state width="
|
|
222
|
-
<state width="
|
|
223
|
-
<state width="
|
|
247
|
+
<state width="1678" height="367" key="GridCell.Tab.0.center/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1599152764316" />
|
|
248
|
+
<state width="1276" height="270" key="GridCell.Tab.0.center/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1599230158300" />
|
|
249
|
+
<state width="1878" height="259" key="GridCell.Tab.0.center/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1599060151001" />
|
|
250
|
+
<state width="1276" height="270" key="GridCell.Tab.0.left" timestamp="1599230158299">
|
|
224
251
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
225
252
|
</state>
|
|
226
253
|
<state width="1750" height="261" key="GridCell.Tab.0.left/-1920.-66.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1596194051668" />
|
|
227
254
|
<state width="1878" height="249" key="GridCell.Tab.0.left/0.23.1792.1097@0.23.1792.1097" timestamp="1596482378170" />
|
|
228
255
|
<state width="1750" height="383" key="GridCell.Tab.0.left/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597945008182" />
|
|
229
|
-
<state width="
|
|
230
|
-
<state width="
|
|
231
|
-
<state width="
|
|
256
|
+
<state width="1678" height="367" key="GridCell.Tab.0.left/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1599152764315" />
|
|
257
|
+
<state width="1276" height="270" key="GridCell.Tab.0.left/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1599230158299" />
|
|
258
|
+
<state width="1878" height="259" key="GridCell.Tab.0.left/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1599060150995" />
|
|
259
|
+
<state width="1276" height="270" key="GridCell.Tab.0.right" timestamp="1599230158300">
|
|
232
260
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
233
261
|
</state>
|
|
234
262
|
<state width="1750" height="261" key="GridCell.Tab.0.right/-1920.-66.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1596194051669" />
|
|
235
263
|
<state width="1878" height="249" key="GridCell.Tab.0.right/0.23.1792.1097@0.23.1792.1097" timestamp="1596482378171" />
|
|
236
264
|
<state width="1750" height="383" key="GridCell.Tab.0.right/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597945008183" />
|
|
237
|
-
<state width="
|
|
238
|
-
<state width="
|
|
239
|
-
<state
|
|
240
|
-
|
|
265
|
+
<state width="1678" height="367" key="GridCell.Tab.0.right/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1599152764316" />
|
|
266
|
+
<state width="1276" height="270" key="GridCell.Tab.0.right/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1599230158300" />
|
|
267
|
+
<state width="1878" height="259" key="GridCell.Tab.0.right/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1599060151002" />
|
|
268
|
+
<state x="2773" y="167" key="IDE.errors.dialog" timestamp="1598973647546">
|
|
269
|
+
<screen x="1792" y="-195" width="3440" height="1417" />
|
|
241
270
|
</state>
|
|
242
271
|
<state x="511" y="303" key="IDE.errors.dialog/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597308623997" />
|
|
272
|
+
<state x="2773" y="167" key="IDE.errors.dialog/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1598973647546" />
|
|
243
273
|
<state x="2340" y="-140" key="IDE.errors.dialog/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1596547237176" />
|
|
244
274
|
<state x="0" y="23" width="1792" height="1097" key="MergeDialog" timestamp="1597409959598">
|
|
245
275
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
@@ -249,11 +279,12 @@
|
|
|
249
279
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
250
280
|
</state>
|
|
251
281
|
<state x="528" y="332" key="MultipleFileMergeDialog/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1597409961435" />
|
|
252
|
-
<state x="
|
|
253
|
-
<screen x="
|
|
282
|
+
<state x="2767" y="31" key="RollbackChangesDialog" timestamp="1598965839229">
|
|
283
|
+
<screen x="1792" y="-195" width="3440" height="1417" />
|
|
254
284
|
</state>
|
|
255
285
|
<state x="508" y="198" key="RollbackChangesDialog/0.23.1792.1097@0.23.1792.1097" timestamp="1596191567466" />
|
|
256
286
|
<state x="508" y="198" key="RollbackChangesDialog/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597748577571" />
|
|
287
|
+
<state x="2767" y="31" key="RollbackChangesDialog/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1598965839229" />
|
|
257
288
|
<state x="508" y="198" key="RollbackChangesDialog/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1597836481148" />
|
|
258
289
|
<state x="397" y="210" key="SettingsEditor" timestamp="1596110346829">
|
|
259
290
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
@@ -263,22 +294,27 @@
|
|
|
263
294
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
264
295
|
</state>
|
|
265
296
|
<state x="428" y="230" key="com.intellij.openapi.vcs.changes.SpecificFilesViewDialog/-1920.-66.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1596103115204" />
|
|
266
|
-
<state x="558" y="310" width="1234" height="580" key="find.popup" timestamp="
|
|
297
|
+
<state x="558" y="310" width="1234" height="580" key="find.popup" timestamp="1599469543819">
|
|
267
298
|
<screen x="0" y="23" width="1792" height="1097" />
|
|
268
299
|
</state>
|
|
269
300
|
<state x="559" y="310" width="1233" height="522" key="find.popup/-1920.-66.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1596116959250" />
|
|
270
301
|
<state x="559" y="310" width="1233" height="522" key="find.popup/0.23.1792.1097@0.23.1792.1097" timestamp="1596191045450" />
|
|
271
302
|
<state x="558" y="310" width="1234" height="580" key="find.popup/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597748403272" />
|
|
272
|
-
<state x="2863" y="176" width="2369" height="738" key="find.popup/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="
|
|
273
|
-
<state x="558" y="310" width="1234" height="580" key="find.popup/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="
|
|
274
|
-
<state x="2390" y="-133" width="1322" height="
|
|
275
|
-
<state x="
|
|
303
|
+
<state x="2863" y="176" width="2369" height="738" key="find.popup/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1599137555658" />
|
|
304
|
+
<state x="558" y="310" width="1234" height="580" key="find.popup/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1599469543819" />
|
|
305
|
+
<state x="2390" y="-133" width="1322" height="582" key="find.popup/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1599038215964" />
|
|
306
|
+
<state x="2477" y="-143" key="refactoring.ChangeSignatureDialog" timestamp="1599040674381">
|
|
307
|
+
<screen x="1792" y="-410" width="1920" height="1057" />
|
|
308
|
+
</state>
|
|
309
|
+
<state x="2477" y="-143" key="refactoring.ChangeSignatureDialog/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1599040674381" />
|
|
310
|
+
<state x="2178" y="-174" width="718" height="652" key="search.everywhere.popup" timestamp="1599489043631">
|
|
276
311
|
<screen x="1792" y="-410" width="1920" height="1057" />
|
|
277
312
|
</state>
|
|
278
313
|
<state x="360" y="268" width="670" height="676" key="search.everywhere.popup/-1920.-66.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1596101738778" />
|
|
279
314
|
<state x="360" y="268" width="670" height="676" key="search.everywhere.popup/0.23.1792.1097@0.23.1792.1097" timestamp="1596191050648" />
|
|
280
315
|
<state x="360" y="268" width="671" height="677" key="search.everywhere.popup/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597748285464" />
|
|
281
|
-
<state x="
|
|
282
|
-
<state x="
|
|
316
|
+
<state x="2484" y="121" width="1287" height="875" key="search.everywhere.popup/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1599137557476" />
|
|
317
|
+
<state x="360" y="268" width="671" height="677" key="search.everywhere.popup/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1599216348282" />
|
|
318
|
+
<state x="2178" y="-174" width="718" height="652" key="search.everywhere.popup/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1599489043631" />
|
|
283
319
|
</component>
|
|
284
320
|
</project>
|
package/package.json
CHANGED
|
@@ -17,14 +17,16 @@ export interface IRecommendationProps {
|
|
|
17
17
|
injectionMethod: InjectionMethod;
|
|
18
18
|
latestLogbookFrom6Hours: logbookEntry;
|
|
19
19
|
carbRecommendationAnswer(carbRecommendationAnswer: boolean): void;
|
|
20
|
-
|
|
20
|
+
closeCalculationCallback(): void;
|
|
21
|
+
exitCallback(): void;
|
|
21
22
|
onRecentInsulinYes(): void;
|
|
22
23
|
transferToLogbook(carbs: IResult, insulin: IResult, reminder: number): void;
|
|
23
24
|
onError(error: RecommendationError): void;
|
|
25
|
+
showBolusBar(toggle: boolean): void;
|
|
24
26
|
}
|
|
25
27
|
interface IState {
|
|
26
28
|
remeasureTime: number;
|
|
27
|
-
|
|
29
|
+
isRecommendationDisplayed: boolean;
|
|
28
30
|
insulinRecommendation: number;
|
|
29
31
|
activityReduction?: number;
|
|
30
32
|
wasLimited: boolean;
|
|
@@ -35,6 +37,7 @@ interface IState {
|
|
|
35
37
|
enteredCarbs?: number;
|
|
36
38
|
enteredInsulin?: number;
|
|
37
39
|
recommendationModal: boolean;
|
|
40
|
+
exitModal: boolean;
|
|
38
41
|
}
|
|
39
42
|
export default class RecommendationScreen extends React.Component<IRecommendationProps, IState> {
|
|
40
43
|
private readonly timer;
|
|
@@ -49,6 +52,8 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
49
52
|
declineCarbRecommendation: () => void;
|
|
50
53
|
acceptCarbRecommendation: () => void;
|
|
51
54
|
hideAttentionModal: () => void;
|
|
55
|
+
hideExitModal: () => void;
|
|
56
|
+
closeCalculation: () => void;
|
|
52
57
|
handleMoodSelected: (selectedMood: IState["selectedMood"]) => void;
|
|
53
58
|
updateInsulinRecommendation: (enteredInsulin: number) => void;
|
|
54
59
|
handleTransfer: () => void;
|
|
@@ -39,7 +39,8 @@ const TransferToLogbook_1 = __importDefault(require("./components/TransferToLogb
|
|
|
39
39
|
const RecommendationError_1 = require("./utils/RecommendationError");
|
|
40
40
|
const macro_1 = require("@lingui/macro");
|
|
41
41
|
const Activity_1 = __importDefault(require("./components/activity/Activity"));
|
|
42
|
-
const
|
|
42
|
+
const ExitModal_1 = __importDefault(require("./components/ExitModal"));
|
|
43
|
+
const RecommendationModal_1 = __importDefault(require("./components/RecommendationModal"));
|
|
43
44
|
const i18nUtils_1 = require("./locale/i18nUtils");
|
|
44
45
|
const RecommendationUtils_1 = require("./utils/RecommendationUtils");
|
|
45
46
|
const Utils_1 = require("./utils/Utils");
|
|
@@ -51,13 +52,19 @@ class RecommendationScreen extends react_1.default.Component {
|
|
|
51
52
|
constructor(props) {
|
|
52
53
|
super(props);
|
|
53
54
|
this.onExit = () => {
|
|
54
|
-
|
|
55
|
+
if (this.state.isRecommendationDisplayed) {
|
|
56
|
+
this.setState({ exitModal: true }, () => this.props.showBolusBar(!this.state.exitModal));
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.props.exitCallback();
|
|
60
|
+
clearTimeout(this.timer);
|
|
61
|
+
}
|
|
55
62
|
};
|
|
56
63
|
this.updateRemeasureTime = (remeasureTime) => {
|
|
57
64
|
this.setState({ remeasureTime });
|
|
58
65
|
};
|
|
59
66
|
this.handleNoRecentInsulin = () => {
|
|
60
|
-
this.setState({
|
|
67
|
+
this.setState({ isRecommendationDisplayed: true }, () => {
|
|
61
68
|
setTimeout(() => {
|
|
62
69
|
this.scrollView?.scrollToEnd({ animated: true });
|
|
63
70
|
}, 0);
|
|
@@ -81,6 +88,14 @@ class RecommendationScreen extends react_1.default.Component {
|
|
|
81
88
|
this.hideAttentionModal = () => {
|
|
82
89
|
this.setState({ recommendationModal: false });
|
|
83
90
|
};
|
|
91
|
+
this.hideExitModal = () => {
|
|
92
|
+
this.setState({ exitModal: false }, () => this.props.showBolusBar(!this.state.exitModal));
|
|
93
|
+
};
|
|
94
|
+
this.closeCalculation = () => {
|
|
95
|
+
this.hideExitModal();
|
|
96
|
+
clearTimeout(this.timer);
|
|
97
|
+
this.props.closeCalculationCallback();
|
|
98
|
+
};
|
|
84
99
|
this.handleMoodSelected = (selectedMood) => {
|
|
85
100
|
this.setState({ selectedMood });
|
|
86
101
|
};
|
|
@@ -88,6 +103,9 @@ class RecommendationScreen extends react_1.default.Component {
|
|
|
88
103
|
this.setState({ enteredInsulin });
|
|
89
104
|
};
|
|
90
105
|
this.handleTransfer = () => {
|
|
106
|
+
if (this.state.exitModal) {
|
|
107
|
+
this.hideExitModal();
|
|
108
|
+
}
|
|
91
109
|
this.props.transferToLogbook({
|
|
92
110
|
suggested: this.suggestedCarbs,
|
|
93
111
|
entered: this.state.enteredCarbs,
|
|
@@ -126,7 +144,7 @@ class RecommendationScreen extends react_1.default.Component {
|
|
|
126
144
|
const activeInsulin = Calculator.calculateActiveInsulin(recentBoluses ?? []);
|
|
127
145
|
this.state = {
|
|
128
146
|
remeasureTime: this.getBGLevelRemeasurementReminder(),
|
|
129
|
-
|
|
147
|
+
isRecommendationDisplayed: recentBoluses?.length !== 0,
|
|
130
148
|
insulinRecommendation: Utils_1.Utils.roundValue(bolus, props.injectionMethod),
|
|
131
149
|
wasLimited,
|
|
132
150
|
activityReduction,
|
|
@@ -134,7 +152,8 @@ class RecommendationScreen extends react_1.default.Component {
|
|
|
134
152
|
carbRecommendation,
|
|
135
153
|
activeInsulin,
|
|
136
154
|
selectedMood: null,
|
|
137
|
-
recommendationModal: wasLimited || !!carbRecommendation || !!this.getBGLevelAttentionMessage(),
|
|
155
|
+
recommendationModal: wasLimited || !!Math.round(carbRecommendation) || !!this.getBGLevelAttentionMessage(),
|
|
156
|
+
exitModal: false,
|
|
138
157
|
};
|
|
139
158
|
this.timer = setTimeout(() => {
|
|
140
159
|
props.onError(RecommendationError_1.TimeoutLimitError());
|
|
@@ -147,7 +166,7 @@ class RecommendationScreen extends react_1.default.Component {
|
|
|
147
166
|
return (<react_2.I18nProvider language={this.props.language} i18n={i18nUtils_1.i18n}>
|
|
148
167
|
<react_native_1.ScrollView style={containerStyles.container} ref={(view) => (this.scrollView = view)}>
|
|
149
168
|
<Header_1.default exitCallback={this.onExit}/>
|
|
150
|
-
<InfoBars_1.default label={i18nUtils_1.i18n._(macro_1.t `Active Insulin`)} value={activeInsulin ? `${activeInsulin.toFixed(1)}` : null} units={i18nUtils_1.i18n._(macro_1.t `units`)} showZeroAsDash={false}/>
|
|
169
|
+
<InfoBars_1.default style={{ flex: 5 }} label={i18nUtils_1.i18n._(macro_1.t `Active Insulin`)} value={activeInsulin ? `${activeInsulin.toFixed(1)}` : null} units={i18nUtils_1.i18n._(macro_1.t `units`)} showZeroAsDash={false}/>
|
|
151
170
|
<InfoBars_1.default label={i18nUtils_1.i18n._(macro_1.t `Blood Glucose Level`)} value={currentBGL ? `${currentBGL}` : null} units={this.props.units} showZeroAsDash={true}/>
|
|
152
171
|
<react_native_1.View style={containerStyles.calcContainer}>
|
|
153
172
|
<react_native_1.View style={containerStyles.calcMargin}>
|
|
@@ -157,17 +176,18 @@ class RecommendationScreen extends react_1.default.Component {
|
|
|
157
176
|
borderColor: carbRecommendation ? Constants_1.BORDER_COLOUR_TEAL : Constants_1.BORDER_COLOUR_GREY,
|
|
158
177
|
},
|
|
159
178
|
]}>
|
|
160
|
-
<RecommendedCarbs_1.default enteredCarbs={`${carbohydrates}`} changedRecommendedCarbs={this.updateCarbRecommendation} recommendedCarbs={`${enteredCarbs ?? carbRecommendation}`} removeRecommendedCarbs={this.removeCarbRecommendation} onError={this.props.onError}/>
|
|
179
|
+
<RecommendedCarbs_1.default enteredCarbs={`${carbohydrates}`} changedRecommendedCarbs={this.updateCarbRecommendation} recommendedCarbs={`${enteredCarbs ?? Math.round(carbRecommendation)}`} removeRecommendedCarbs={this.removeCarbRecommendation} onError={this.props.onError}/>
|
|
161
180
|
<Remeasure_1.default onSliderChange={this.updateRemeasureTime} remeasureTime={this.state.remeasureTime}/>
|
|
162
181
|
</react_native_1.View>
|
|
163
182
|
</react_native_1.View>
|
|
164
183
|
</react_native_1.View>
|
|
165
184
|
{this.props.calculatorParams.activity && this.props.activityType !== null ? (<Activity_1.default activity={this.props.calculatorParams.activity} activityType={this.props.activityType} activityReduction={this.state.activityReduction}/>) : null}
|
|
166
|
-
{this.state.
|
|
185
|
+
{!this.state.isRecommendationDisplayed ? (<RecentInsulin_1.default onRecentInsulinYes={this.props.onRecentInsulinYes} onRecentInsulinNo={this.handleNoRecentInsulin}/>) : (<RecommendedInsulin_1.default injectionMethod={this.props.injectionMethod} insulinRecommendation={this.state.enteredInsulin ?? this.state.insulinRecommendation} activityReduction={this.state.activityReduction} updateRecommendedInsulin={this.updateInsulinRecommendation} onError={this.props.onError}/>)}
|
|
167
186
|
<Emotion_1.default moodSelected={this.handleMoodSelected} currentMood={this.state.selectedMood}/>
|
|
168
|
-
<TransferToLogbook_1.default visible={
|
|
169
|
-
<
|
|
187
|
+
<TransferToLogbook_1.default visible={this.state.isRecommendationDisplayed} transfer={this.handleTransfer}/>
|
|
188
|
+
<RecommendationModal_1.default isVisible={recommendationModal} suggestedCarbohydrates={carbRecommendation} attentionMessage={this.getBGLevelAttentionMessage()} limitationMessage={this.getLimitationAttentionMessage()} onClickOkButton={this.hideAttentionModal} onAcceptCarbohydrates={this.acceptCarbRecommendation} onDeclineCarbohydrates={this.declineCarbRecommendation}/>
|
|
170
189
|
</react_native_1.ScrollView>
|
|
190
|
+
{this.state.exitModal ? (<ExitModal_1.default onSave={this.handleTransfer} onCloseCalculation={this.closeCalculation} onClose={this.hideExitModal}/>) : null}
|
|
171
191
|
</react_2.I18nProvider>);
|
|
172
192
|
}
|
|
173
193
|
}
|