@hedia/recommendation-screen 1.1.2 → 1.2.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.
@@ -1,14 +1,6 @@
1
1
  <component name="ProjectCodeStyleConfiguration">
2
2
  <code_scheme name="Project" version="173">
3
3
  <option name="LINE_SEPARATOR" value="&#10;" />
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" />
@@ -1,7 +1,35 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
+ <component name="BranchesTreeState">
4
+ <expand>
5
+ <path>
6
+ <item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
7
+ <item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
8
+ </path>
9
+ <path>
10
+ <item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
11
+ <item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
12
+ </path>
13
+ <path>
14
+ <item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
15
+ <item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
16
+ <item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
17
+ </path>
18
+ </expand>
19
+ <select>
20
+ <path>
21
+ <item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
22
+ <item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
23
+ <item name="BRANCH:recalculation" type="e8cecc67:BranchNodeDescriptor" />
24
+ </path>
25
+ </select>
26
+ </component>
3
27
  <component name="ChangeListManager">
4
- <list default="true" id="bceba75c-4c15-4bdc-9b41-023f63a30830" name="Default Changelist" comment="" />
28
+ <list default="true" id="bceba75c-4c15-4bdc-9b41-023f63a30830" name="Default Changelist" comment="">
29
+ <change beforePath="$PROJECT_DIR$/App.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/App.tsx" afterDir="false" />
30
+ <change beforePath="$PROJECT_DIR$/src/RecommendationScreen.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/RecommendationScreen.tsx" afterDir="false" />
31
+ <change beforePath="$PROJECT_DIR$/src/utils/RecommendationUtils.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/utils/RecommendationUtils.ts" afterDir="false" />
32
+ </list>
5
33
  <option name="SHOW_DIALOG" value="false" />
6
34
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
7
35
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -17,6 +45,7 @@
17
45
  <option name="showLibraryContents" value="true" />
18
46
  </component>
19
47
  <component name="PropertiesComponent">
48
+ <property name="ASKED_MARK_IGNORED_FILES_AS_EXCLUDED" value="true" />
20
49
  <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
21
50
  <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
22
51
  <property name="TERMINAL_CUSTOM_COMMANDS_GOT_IT" value="true" />
@@ -36,6 +65,7 @@
36
65
  <property name="run.prettier.on.save" value="true" />
37
66
  <property name="settings.editor.selected.configurable" value="settings.javascript.prettier" />
38
67
  <property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
68
+ <property name="vue.rearranger.settings.migration" value="true" />
39
69
  </component>
40
70
  <component name="RecentsManager">
41
71
  <key name="CopyFile.RECENT_KEYS">
@@ -129,6 +159,12 @@
129
159
  <workItem from="1597740771454" duration="22346000" />
130
160
  <workItem from="1597909150337" duration="7043000" />
131
161
  <workItem from="1598019682936" duration="792000" />
162
+ <workItem from="1598364310905" duration="450000" />
163
+ <workItem from="1598519875100" duration="8739000" />
164
+ <workItem from="1598549768243" duration="327000" />
165
+ <workItem from="1598599347013" duration="7546000" />
166
+ <workItem from="1598858637503" duration="10795000" />
167
+ <workItem from="1598949840662" duration="7868000" />
132
168
  </task>
133
169
  <servers />
134
170
  </component>
@@ -136,55 +172,87 @@
136
172
  <option name="version" value="3" />
137
173
  <option name="exactExcludedFiles">
138
174
  <list>
139
- <option value="$PROJECT_DIR$/index.js" />
140
175
  <option value="$PROJECT_DIR$/App.jsx" />
141
176
  <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
177
  <option value="$PROJECT_DIR$/src/types/enum.d.ts" />
146
178
  <option value="$PROJECT_DIR$/src/types/enum.js" />
147
179
  <option value="$PROJECT_DIR$/src/types/types.d.ts" />
148
180
  <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" />
181
+ <option value="$PROJECT_DIR$/index.js" />
182
+ <option value="$PROJECT_DIR$/index.d.ts" />
183
+ <option value="$PROJECT_DIR$/src/RecommendationScreen.d.ts" />
184
+ <option value="$PROJECT_DIR$/src/RecommendationScreen.jsx" />
185
+ <option value="$PROJECT_DIR$/src/components/RecommendedInsulin.d.ts" />
160
186
  <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
187
  <option value="$PROJECT_DIR$/src/components/Header.jsx" />
171
- <option value="$PROJECT_DIR$/src/components/TransferToLogbook.d.ts" />
172
188
  <option value="$PROJECT_DIR$/src/components/RecentInsulin.d.ts" />
173
- <option value="$PROJECT_DIR$/src/components/RecommendedInsulin.d.ts" />
189
+ <option value="$PROJECT_DIR$/src/components/Header.d.ts" />
190
+ <option value="$PROJECT_DIR$/src/components/TransferToLogbook.d.ts" />
191
+ <option value="$PROJECT_DIR$/src/components/InfoBars.d.ts" />
192
+ <option value="$PROJECT_DIR$/src/components/RecommendationModal.d.ts" />
193
+ <option value="$PROJECT_DIR$/src/components/RecommendationModal.jsx" />
194
+ <option value="$PROJECT_DIR$/src/components/Remeasure.d.ts" />
195
+ <option value="$PROJECT_DIR$/src/components/RecommendedCarbs.d.ts" />
196
+ <option value="$PROJECT_DIR$/src/components/Remeasure.jsx" />
197
+ <option value="$PROJECT_DIR$/src/components/InvisibleNumberInput.d.ts" />
174
198
  <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" />
199
+ <option value="$PROJECT_DIR$/src/components/InvisibleNumberInput.jsx" />
200
+ <option value="$PROJECT_DIR$/src/components/ExitModal.jsx" />
179
201
  <option value="$PROJECT_DIR$/src/components/activity/ActivityIcon.d.ts" />
180
202
  <option value="$PROJECT_DIR$/src/components/activity/Activity.d.ts" />
181
203
  <option value="$PROJECT_DIR$/src/components/activity/ActivityIntensity.d.ts" />
182
204
  <option value="$PROJECT_DIR$/src/components/activity/Activity.jsx" />
205
+ <option value="$PROJECT_DIR$/src/components/TransferToLogbook.jsx" />
206
+ <option value="$PROJECT_DIR$/src/components/ExitModal.d.ts" />
207
+ <option value="$PROJECT_DIR$/src/components/RecommendedInsulin.jsx" />
208
+ <option value="$PROJECT_DIR$/src/components/RecentInsulin.jsx" />
209
+ <option value="$PROJECT_DIR$/src/components/mood/MoodIcon.d.ts" />
210
+ <option value="$PROJECT_DIR$/src/components/mood/Emotion.d.ts" />
211
+ <option value="$PROJECT_DIR$/src/utils/AttentionMessages.jsx" />
212
+ <option value="$PROJECT_DIR$/src/utils/RecommendationUtils.js" />
183
213
  <option value="$PROJECT_DIR$/src/components/activity/ActivityIcon.jsx" />
184
214
  <option value="$PROJECT_DIR$/src/components/activity/ActivityIntensity.jsx" />
215
+ <option value="$PROJECT_DIR$/src/components/mood/MoodIcon.jsx" />
216
+ <option value="$PROJECT_DIR$/src/components/mood/Emotion.jsx" />
217
+ <option value="$PROJECT_DIR$/src/utils/Constants.d.ts" />
218
+ <option value="$PROJECT_DIR$/src/utils/Utils.d.ts" />
219
+ <option value="$PROJECT_DIR$/src/utils/Validations.js" />
220
+ <option value="$PROJECT_DIR$/src/utils/Utils.js" />
221
+ <option value="$PROJECT_DIR$/src/utils/AttentionMessages.d.ts" />
222
+ <option value="$PROJECT_DIR$/src/utils/RecommendationError.jsx" />
223
+ <option value="$PROJECT_DIR$/src/utils/RecommendationUtils.d.ts" />
224
+ <option value="$PROJECT_DIR$/src/utils/RecommendationError.d.ts" />
225
+ <option value="$PROJECT_DIR$/src/utils/Validations.d.ts" />
226
+ <option value="$PROJECT_DIR$/src/utils/Constants.js" />
227
+ <option value="$PROJECT_DIR$/src/locale/i18nUtils.js" />
228
+ <option value="$PROJECT_DIR$/src/locale/i18nUtils.d.ts" />
185
229
  </list>
186
230
  </option>
187
231
  </component>
232
+ <component name="Vcs.Log.Tabs.Properties">
233
+ <option name="TAB_STATES">
234
+ <map>
235
+ <entry key="MAIN">
236
+ <value>
237
+ <State>
238
+ <option name="FILTERS">
239
+ <map>
240
+ <entry key="branch">
241
+ <value>
242
+ <list>
243
+ <option value="recalculation" />
244
+ </list>
245
+ </value>
246
+ </entry>
247
+ </map>
248
+ </option>
249
+ </State>
250
+ </value>
251
+ </entry>
252
+ </map>
253
+ </option>
254
+ <option name="oldMeFiltersMigrated" value="true" />
255
+ </component>
188
256
  <component name="WindowStateProjectService">
189
257
  <state x="360" y="233" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1596109376244">
190
258
  <screen x="0" y="23" width="1792" height="1097" />
@@ -198,44 +266,49 @@
198
266
  <screen x="0" y="23" width="1792" height="1097" />
199
267
  </state>
200
268
  <state x="226" y="61" key="CommitChangelistDialog2/1792.-195.3440.1417/0.23.1792.1097@0.23.1792.1097" timestamp="1597746124626" />
201
- <state x="0" y="123" width="1792" height="897" key="DiffContextDialog" timestamp="1597836504040">
202
- <screen x="0" y="23" width="1792" height="1097" />
269
+ <state x="1792" y="-314" width="1920" height="865" key="DiffContextDialog" timestamp="1598603549140">
270
+ <screen x="1792" y="-410" width="1920" height="1057" />
203
271
  </state>
204
272
  <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
273
  <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
274
  <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="1750" height="383" key="GridCell.Tab.0.bottom" timestamp="1597945008184">
208
- <screen x="0" y="23" width="1792" height="1097" />
275
+ <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" />
276
+ <state width="1604" height="300" key="GridCell.Tab.0.bottom" timestamp="1598953261143">
277
+ <screen x="1792" y="-195" width="3440" height="1417" />
209
278
  </state>
210
279
  <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
280
  <state width="1878" height="249" key="GridCell.Tab.0.bottom/0.23.1792.1097@0.23.1792.1097" timestamp="1596482378171" />
212
281
  <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="1750" height="383" key="GridCell.Tab.0.bottom/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1597916887608" />
214
- <state width="854" height="454" key="GridCell.Tab.0.bottom/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1597840452738" />
215
- <state width="1750" height="383" key="GridCell.Tab.0.center" timestamp="1597945008183">
216
- <screen x="0" y="23" width="1792" height="1097" />
282
+ <state width="1604" height="300" key="GridCell.Tab.0.bottom/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1598953261143" />
283
+ <state width="1750" height="220" key="GridCell.Tab.0.bottom/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1598886018496" />
284
+ <state width="1878" height="210" key="GridCell.Tab.0.bottom/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1598625367900" />
285
+ <state width="1604" height="300" key="GridCell.Tab.0.center" timestamp="1598953261142">
286
+ <screen x="1792" y="-195" width="3440" height="1417" />
217
287
  </state>
218
288
  <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
289
  <state width="1878" height="249" key="GridCell.Tab.0.center/0.23.1792.1097@0.23.1792.1097" timestamp="1596482378170" />
220
290
  <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="1750" height="383" key="GridCell.Tab.0.center/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1597916887607" />
222
- <state width="854" height="454" key="GridCell.Tab.0.center/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1597840452737" />
223
- <state width="1750" height="383" key="GridCell.Tab.0.left" timestamp="1597945008182">
224
- <screen x="0" y="23" width="1792" height="1097" />
291
+ <state width="1604" height="300" key="GridCell.Tab.0.center/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1598953261142" />
292
+ <state width="1750" height="220" key="GridCell.Tab.0.center/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1598886018494" />
293
+ <state width="1878" height="210" key="GridCell.Tab.0.center/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1598625367899" />
294
+ <state width="1604" height="300" key="GridCell.Tab.0.left" timestamp="1598953261142">
295
+ <screen x="1792" y="-195" width="3440" height="1417" />
225
296
  </state>
226
297
  <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
298
  <state width="1878" height="249" key="GridCell.Tab.0.left/0.23.1792.1097@0.23.1792.1097" timestamp="1596482378170" />
228
299
  <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="1750" height="383" key="GridCell.Tab.0.left/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1597916887606" />
230
- <state width="854" height="454" key="GridCell.Tab.0.left/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1597840452736" />
231
- <state width="1750" height="383" key="GridCell.Tab.0.right" timestamp="1597945008183">
232
- <screen x="0" y="23" width="1792" height="1097" />
300
+ <state width="1604" height="300" key="GridCell.Tab.0.left/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1598953261142" />
301
+ <state width="1750" height="220" key="GridCell.Tab.0.left/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1598886018494" />
302
+ <state width="1878" height="210" key="GridCell.Tab.0.left/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1598625367899" />
303
+ <state width="1604" height="300" key="GridCell.Tab.0.right" timestamp="1598953261143">
304
+ <screen x="1792" y="-195" width="3440" height="1417" />
233
305
  </state>
234
306
  <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
307
  <state width="1878" height="249" key="GridCell.Tab.0.right/0.23.1792.1097@0.23.1792.1097" timestamp="1596482378171" />
236
308
  <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="1750" height="383" key="GridCell.Tab.0.right/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1597916887607" />
238
- <state width="854" height="454" key="GridCell.Tab.0.right/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1597840452738" />
309
+ <state width="1604" height="300" key="GridCell.Tab.0.right/1792.-195.3440.1417/0.23.1792.1097@1792.-195.3440.1417" timestamp="1598953261143" />
310
+ <state width="1750" height="220" key="GridCell.Tab.0.right/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1598886018495" />
311
+ <state width="1878" height="210" key="GridCell.Tab.0.right/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1598625367899" />
239
312
  <state x="511" y="303" key="IDE.errors.dialog" timestamp="1597308623997">
240
313
  <screen x="0" y="23" width="1792" height="1097" />
241
314
  </state>
@@ -263,22 +336,23 @@
263
336
  <screen x="0" y="23" width="1792" height="1097" />
264
337
  </state>
265
338
  <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="1597841848227">
267
- <screen x="0" y="23" width="1792" height="1097" />
339
+ <state x="2863" y="176" width="2369" height="738" key="find.popup" timestamp="1598961042754">
340
+ <screen x="1792" y="-195" width="3440" height="1417" />
268
341
  </state>
269
342
  <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
343
  <state x="559" y="310" width="1233" height="522" key="find.popup/0.23.1792.1097@0.23.1792.1097" timestamp="1596191045450" />
271
344
  <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="1596722032790" />
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="1597841848227" />
345
+ <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="1598961042754" />
346
+ <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="1598882534515" />
274
347
  <state x="2390" y="-133" width="1322" height="550" key="find.popup/1792.-410.1920.1057/0.23.1792.1097@1792.-410.1920.1057" timestamp="1597071162908" />
275
- <state x="2178" y="-174" width="718" height="652" key="search.everywhere.popup" timestamp="1597841174345">
276
- <screen x="1792" y="-410" width="1920" height="1057" />
348
+ <state x="2484" y="121" width="1287" height="875" key="search.everywhere.popup" timestamp="1598960846257">
349
+ <screen x="1792" y="-195" width="3440" height="1417" />
277
350
  </state>
278
351
  <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
352
  <state x="360" y="268" width="670" height="676" key="search.everywhere.popup/0.23.1792.1097@0.23.1792.1097" timestamp="1596191050648" />
280
353
  <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="360" y="268" width="671" height="677" key="search.everywhere.popup/1792.-410.1920.1057/0.23.1792.1097@0.23.1792.1097" timestamp="1597839683636" />
354
+ <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="1598960846257" />
355
+ <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="1598870468987" />
282
356
  <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="1597841174345" />
283
357
  </component>
284
358
  </project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/recommendation-screen",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "Hedia Recommendation Screen for Bolus and Carbohydrates",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,14 +17,16 @@ export interface IRecommendationProps {
17
17
  injectionMethod: InjectionMethod;
18
18
  latestLogbookFrom6Hours: logbookEntry;
19
19
  carbRecommendationAnswer(carbRecommendationAnswer: boolean): void;
20
- exitCallback(recentInsulin: boolean): void;
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
- showRecentInsulin: boolean;
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 HediaRecommendationModal_1 = __importDefault(require("./components/HediaRecommendationModal"));
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
- this.props.exitCallback(this.state.showRecentInsulin);
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({ showRecentInsulin: false }, () => {
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
- showRecentInsulin: recentBoluses?.length === 0,
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());
@@ -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.showRecentInsulin ? (<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}/>)}
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={!this.state.showRecentInsulin} transfer={this.handleTransfer}/>
169
- <HediaRecommendationModal_1.default isVisible={recommendationModal} suggestedCarbohydrates={carbRecommendation} attentionMessage={this.getBGLevelAttentionMessage()} limitationMessage={this.getLimitationAttentionMessage()} onClickOkButton={this.hideAttentionModal} onAcceptCarbohydrates={this.acceptCarbRecommendation} onDeclineCarbohydrates={this.declineCarbRecommendation}/>
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
  }
@@ -18,7 +18,8 @@ import { RecommendationError, TimeoutLimitError } from "./utils/RecommendationEr
18
18
 
19
19
  import { t } from "@lingui/macro";
20
20
  import Activity from "./components/activity/Activity";
21
- import HediaRecommendationModal from "./components/HediaRecommendationModal";
21
+ import ExitModal from "./components/ExitModal";
22
+ import RecommendationModal from "./components/RecommendationModal";
22
23
  import { changeLanguage, i18n } from "./locale/i18nUtils";
23
24
  import { IActivity, logbookEntry } from "./types/types";
24
25
  import { AttentionMessage } from "./utils/AttentionMessages";
@@ -53,15 +54,17 @@ export interface IRecommendationProps {
53
54
 
54
55
  // Callbacks
55
56
  carbRecommendationAnswer(carbRecommendationAnswer: boolean): void;
56
- exitCallback(recentInsulin: boolean): void;
57
+ closeCalculationCallback(): void;
58
+ exitCallback(): void;
57
59
  onRecentInsulinYes(): void;
58
60
  transferToLogbook(carbs: IResult, insulin: IResult, reminder: number): void;
59
61
  onError(error: RecommendationError): void;
62
+ showBolusBar(toggle: boolean): void;
60
63
  }
61
64
 
62
65
  interface IState {
63
66
  remeasureTime: number;
64
- showRecentInsulin: boolean;
67
+ isRecommendationDisplayed: boolean;
65
68
  insulinRecommendation: number;
66
69
  activityReduction?: number;
67
70
  wasLimited: boolean;
@@ -72,6 +75,7 @@ interface IState {
72
75
  enteredCarbs?: number;
73
76
  enteredInsulin?: number;
74
77
  recommendationModal: boolean;
78
+ exitModal: boolean;
75
79
  }
76
80
 
77
81
  export default class RecommendationScreen extends React.Component<IRecommendationProps, IState> {
@@ -100,7 +104,7 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
100
104
 
101
105
  this.state = {
102
106
  remeasureTime: this.getBGLevelRemeasurementReminder(),
103
- showRecentInsulin: recentBoluses?.length === 0,
107
+ isRecommendationDisplayed: recentBoluses?.length !== 0,
104
108
  insulinRecommendation: Utils.roundValue(bolus, props.injectionMethod),
105
109
  wasLimited,
106
110
  activityReduction,
@@ -108,7 +112,8 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
108
112
  carbRecommendation,
109
113
  activeInsulin,
110
114
  selectedMood: null,
111
- recommendationModal: wasLimited || !!carbRecommendation || !!this.getBGLevelAttentionMessage(),
115
+ recommendationModal: wasLimited || !!Math.round(carbRecommendation) || !!this.getBGLevelAttentionMessage(),
116
+ exitModal: false,
112
117
  };
113
118
 
114
119
  this.timer = setTimeout((): void => {
@@ -117,7 +122,12 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
117
122
  }
118
123
 
119
124
  public onExit = (): void => {
120
- this.props.exitCallback(this.state.showRecentInsulin);
125
+ if (this.state.isRecommendationDisplayed) {
126
+ this.setState({ exitModal: true }, (): void => this.props.showBolusBar(!this.state.exitModal));
127
+ } else {
128
+ this.props.exitCallback();
129
+ clearTimeout(this.timer);
130
+ }
121
131
  };
122
132
 
123
133
  public updateRemeasureTime = (remeasureTime: number): void => {
@@ -125,7 +135,7 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
125
135
  };
126
136
 
127
137
  public handleNoRecentInsulin = (): void => {
128
- this.setState({ showRecentInsulin: false }, (): void => {
138
+ this.setState({ isRecommendationDisplayed: true }, (): void => {
129
139
  setTimeout((): void => {
130
140
  this.scrollView?.scrollToEnd({ animated: true });
131
141
  }, 0);
@@ -153,6 +163,15 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
153
163
  this.setState({ recommendationModal: false });
154
164
  };
155
165
 
166
+ public hideExitModal = (): void => {
167
+ this.setState({ exitModal: false }, (): void => this.props.showBolusBar(!this.state.exitModal));
168
+ };
169
+ public closeCalculation = (): void => {
170
+ this.hideExitModal();
171
+ clearTimeout(this.timer);
172
+ this.props.closeCalculationCallback();
173
+ };
174
+
156
175
  public handleMoodSelected = (selectedMood: IState["selectedMood"]): void => {
157
176
  this.setState({ selectedMood });
158
177
  };
@@ -162,6 +181,9 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
162
181
  };
163
182
 
164
183
  public handleTransfer = (): void => {
184
+ if (this.state.exitModal) {
185
+ this.hideExitModal();
186
+ }
165
187
  this.props.transferToLogbook(
166
188
  {
167
189
  suggested: this.suggestedCarbs,
@@ -229,7 +251,7 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
229
251
  <RecommendedCarbs
230
252
  enteredCarbs={`${carbohydrates}`}
231
253
  changedRecommendedCarbs={this.updateCarbRecommendation}
232
- recommendedCarbs={`${enteredCarbs ?? carbRecommendation}`}
254
+ recommendedCarbs={`${enteredCarbs ?? Math.round(carbRecommendation)}`}
233
255
  removeRecommendedCarbs={this.removeCarbRecommendation}
234
256
  onError={this.props.onError}
235
257
  />
@@ -247,7 +269,7 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
247
269
  activityReduction={this.state.activityReduction}
248
270
  />
249
271
  ) : null}
250
- {this.state.showRecentInsulin ? (
272
+ {!this.state.isRecommendationDisplayed ? (
251
273
  <RecentInsulin
252
274
  onRecentInsulinYes={this.props.onRecentInsulinYes}
253
275
  onRecentInsulinNo={this.handleNoRecentInsulin}
@@ -262,8 +284,8 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
262
284
  />
263
285
  )}
264
286
  <Emotion moodSelected={this.handleMoodSelected} currentMood={this.state.selectedMood} />
265
- <TransferToLogbook visible={!this.state.showRecentInsulin} transfer={this.handleTransfer} />
266
- <HediaRecommendationModal
287
+ <TransferToLogbook visible={this.state.isRecommendationDisplayed} transfer={this.handleTransfer} />
288
+ <RecommendationModal
267
289
  isVisible={recommendationModal}
268
290
  suggestedCarbohydrates={carbRecommendation}
269
291
  attentionMessage={this.getBGLevelAttentionMessage()}
@@ -273,6 +295,13 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
273
295
  onDeclineCarbohydrates={this.declineCarbRecommendation}
274
296
  />
275
297
  </ScrollView>
298
+ {this.state.exitModal ? (
299
+ <ExitModal
300
+ onSave={this.handleTransfer}
301
+ onCloseCalculation={this.closeCalculation}
302
+ onClose={this.hideExitModal}
303
+ />
304
+ ) : null}
276
305
  </I18nProvider>
277
306
  );
278
307
  }
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ interface IModalProps {
3
+ onSave(): void;
4
+ onCloseCalculation(): void;
5
+ onClose(): void;
6
+ }
7
+ export default class ExitModal extends React.Component<IModalProps> {
8
+ constructor(props: IModalProps);
9
+ render(): JSX.Element;
10
+ }
11
+ export {};