@hedia/recommendation-screen 2.1.7 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coverage/clover.xml +38 -38
- package/coverage/coverage-final.json +4 -4
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/src/RecommendationScreen.tsx.html +1 -1
- package/coverage/lcov-report/src/__tests__/index.html +1 -1
- package/coverage/lcov-report/src/__tests__/utils.tsx.html +3 -3
- package/coverage/lcov-report/src/components/Header.tsx.html +1 -1
- package/coverage/lcov-report/src/components/InfoBars.tsx.html +1 -1
- package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +11 -11
- package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +1 -1
- package/coverage/lcov-report/src/components/LineSeparator.tsx.html +1 -1
- package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +1 -1
- package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +1 -1
- package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +1 -1
- package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +21 -21
- package/coverage/lcov-report/src/components/Remeasure.tsx.html +1 -1
- package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +1 -1
- package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +1 -1
- package/coverage/lcov-report/src/components/activity/Activity.tsx.html +1 -1
- package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +1 -1
- package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +1 -1
- package/coverage/lcov-report/src/components/activity/index.html +1 -1
- package/coverage/lcov-report/src/components/index.html +1 -1
- package/coverage/lcov-report/src/components/mood/Emotion.tsx.html +1 -1
- package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +1 -1
- package/coverage/lcov-report/src/components/mood/index.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/locale/i18nUtils.ts.html +1 -1
- package/coverage/lcov-report/src/locale/index.html +1 -1
- package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +1 -1
- package/coverage/lcov-report/src/utils/Constants.ts.html +1 -1
- package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +1 -1
- package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +1 -1
- package/coverage/lcov-report/src/utils/Translations.ts.html +1 -1
- package/coverage/lcov-report/src/utils/Utils.ts.html +4 -4
- package/coverage/lcov-report/src/utils/Validations.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov.info +62 -62
- package/package.json +5 -4
- package/src/__tests__/components/RecommendedInsulin.test.js +8 -7
package/coverage/lcov.info
CHANGED
|
@@ -247,7 +247,7 @@ FNDA:67,generateDefaultCalculatorParams
|
|
|
247
247
|
FNDA:22,generateActivityProps
|
|
248
248
|
FNDA:24,generateDefaultActivitySettings
|
|
249
249
|
FNDA:98,generateDefaultLogbook
|
|
250
|
-
FNDA:
|
|
250
|
+
FNDA:303,expectTextExists
|
|
251
251
|
FNDA:26,queryTextFromComponent
|
|
252
252
|
FNDA:93,expectTextNotExists
|
|
253
253
|
FNDA:12,i18nProvided
|
|
@@ -263,8 +263,8 @@ DA:45,67
|
|
|
263
263
|
DA:66,22
|
|
264
264
|
DA:75,24
|
|
265
265
|
DA:84,98
|
|
266
|
-
DA:109,
|
|
267
|
-
DA:115,
|
|
266
|
+
DA:109,303
|
|
267
|
+
DA:115,303
|
|
268
268
|
DA:119,26
|
|
269
269
|
DA:120,26
|
|
270
270
|
DA:121,26
|
|
@@ -378,20 +378,20 @@ FN:69,(anonymous_6)
|
|
|
378
378
|
FN:76,(anonymous_7)
|
|
379
379
|
FNF:8
|
|
380
380
|
FNH:8
|
|
381
|
-
FNDA:
|
|
381
|
+
FNDA:134,(anonymous_0)
|
|
382
382
|
FNDA:45,(anonymous_1)
|
|
383
383
|
FNDA:45,(anonymous_2)
|
|
384
384
|
FNDA:40,(anonymous_3)
|
|
385
385
|
FNDA:41,(anonymous_4)
|
|
386
386
|
FNDA:14,(anonymous_5)
|
|
387
|
-
FNDA:
|
|
388
|
-
FNDA:
|
|
389
|
-
DA:23,
|
|
390
|
-
DA:28,
|
|
391
|
-
DA:31,
|
|
387
|
+
FNDA:441,(anonymous_6)
|
|
388
|
+
FNDA:882,(anonymous_7)
|
|
389
|
+
DA:23,134
|
|
390
|
+
DA:28,134
|
|
391
|
+
DA:31,134
|
|
392
392
|
DA:32,45
|
|
393
393
|
DA:35,45
|
|
394
|
-
DA:39,
|
|
394
|
+
DA:39,134
|
|
395
395
|
DA:40,45
|
|
396
396
|
DA:41,45
|
|
397
397
|
DA:42,40
|
|
@@ -400,24 +400,24 @@ DA:44,40
|
|
|
400
400
|
DA:46,45
|
|
401
401
|
DA:47,40
|
|
402
402
|
DA:49,5
|
|
403
|
-
DA:52,
|
|
403
|
+
DA:52,134
|
|
404
404
|
DA:53,41
|
|
405
405
|
DA:54,41
|
|
406
406
|
DA:55,41
|
|
407
407
|
DA:56,36
|
|
408
408
|
DA:58,41
|
|
409
409
|
DA:61,41
|
|
410
|
-
DA:64,
|
|
410
|
+
DA:64,134
|
|
411
411
|
DA:65,14
|
|
412
412
|
DA:66,14
|
|
413
|
-
DA:70,
|
|
414
|
-
DA:71,
|
|
415
|
-
DA:77,
|
|
416
|
-
DA:78,
|
|
413
|
+
DA:70,441
|
|
414
|
+
DA:71,441
|
|
415
|
+
DA:77,882
|
|
416
|
+
DA:78,441
|
|
417
417
|
DA:92,4
|
|
418
418
|
LF:29
|
|
419
419
|
LH:29
|
|
420
|
-
BRDA:29,0,0,
|
|
420
|
+
BRDA:29,0,0,134
|
|
421
421
|
BRDA:29,0,1,8
|
|
422
422
|
BRDA:33,1,0,45
|
|
423
423
|
BRDA:33,1,1,8
|
|
@@ -427,8 +427,8 @@ BRDA:53,3,0,31
|
|
|
427
427
|
BRDA:53,3,1,10
|
|
428
428
|
BRDA:55,4,0,36
|
|
429
429
|
BRDA:55,4,1,5
|
|
430
|
-
BRDA:77,5,0,
|
|
431
|
-
BRDA:77,5,1,
|
|
430
|
+
BRDA:77,5,0,441
|
|
431
|
+
BRDA:77,5,1,441
|
|
432
432
|
BRF:12
|
|
433
433
|
BRH:12
|
|
434
434
|
end_of_record
|
|
@@ -605,60 +605,60 @@ FN:81,(anonymous_5)
|
|
|
605
605
|
FN:123,(anonymous_6)
|
|
606
606
|
FNF:7
|
|
607
607
|
FNH:7
|
|
608
|
-
FNDA:
|
|
609
|
-
FNDA:
|
|
608
|
+
FNDA:73,(anonymous_0)
|
|
609
|
+
FNDA:70,(anonymous_1)
|
|
610
610
|
FNDA:1,(anonymous_2)
|
|
611
|
-
FNDA:
|
|
612
|
-
FNDA:
|
|
613
|
-
FNDA:
|
|
614
|
-
FNDA:
|
|
611
|
+
FNDA:18,(anonymous_3)
|
|
612
|
+
FNDA:29,(anonymous_4)
|
|
613
|
+
FNDA:143,(anonymous_5)
|
|
614
|
+
FNDA:73,(anonymous_6)
|
|
615
615
|
DA:29,2
|
|
616
|
-
DA:35,
|
|
617
|
-
DA:37,
|
|
618
|
-
DA:43,
|
|
619
|
-
DA:44,
|
|
616
|
+
DA:35,73
|
|
617
|
+
DA:37,73
|
|
618
|
+
DA:43,70
|
|
619
|
+
DA:44,70
|
|
620
620
|
DA:45,2
|
|
621
|
-
DA:49,
|
|
621
|
+
DA:49,73
|
|
622
622
|
DA:50,1
|
|
623
|
-
DA:53,
|
|
624
|
-
DA:55,
|
|
625
|
-
DA:56,
|
|
626
|
-
DA:59,
|
|
627
|
-
DA:62,
|
|
628
|
-
DA:63,
|
|
629
|
-
DA:66,
|
|
630
|
-
DA:68,
|
|
623
|
+
DA:53,73
|
|
624
|
+
DA:55,18
|
|
625
|
+
DA:56,18
|
|
626
|
+
DA:59,18
|
|
627
|
+
DA:62,73
|
|
628
|
+
DA:63,29
|
|
629
|
+
DA:66,28
|
|
630
|
+
DA:68,28
|
|
631
631
|
DA:69,12
|
|
632
632
|
DA:70,12
|
|
633
633
|
DA:71,12
|
|
634
|
-
DA:77,
|
|
635
|
-
DA:78,
|
|
636
|
-
DA:81,
|
|
637
|
-
DA:82,
|
|
638
|
-
DA:83,
|
|
639
|
-
DA:84,
|
|
640
|
-
DA:123,
|
|
634
|
+
DA:77,16
|
|
635
|
+
DA:78,16
|
|
636
|
+
DA:81,73
|
|
637
|
+
DA:82,143
|
|
638
|
+
DA:83,143
|
|
639
|
+
DA:84,143
|
|
640
|
+
DA:123,73
|
|
641
641
|
DA:131,2
|
|
642
642
|
LF:27
|
|
643
643
|
LH:27
|
|
644
644
|
BRDA:44,0,0,2
|
|
645
|
-
BRDA:44,0,1,
|
|
645
|
+
BRDA:44,0,1,68
|
|
646
646
|
BRDA:55,1,0,2
|
|
647
|
-
BRDA:55,1,1,
|
|
648
|
-
BRDA:55,2,0,
|
|
649
|
-
BRDA:55,2,1,
|
|
647
|
+
BRDA:55,1,1,16
|
|
648
|
+
BRDA:55,2,0,18
|
|
649
|
+
BRDA:55,2,1,12
|
|
650
650
|
BRDA:55,2,2,3
|
|
651
|
-
BRDA:66,3,0,
|
|
651
|
+
BRDA:66,3,0,28
|
|
652
652
|
BRDA:66,3,1,15
|
|
653
653
|
BRDA:68,4,0,12
|
|
654
|
-
BRDA:68,4,1,
|
|
654
|
+
BRDA:68,4,1,16
|
|
655
655
|
BRDA:69,5,0,12
|
|
656
656
|
BRDA:69,5,1,3
|
|
657
|
-
BRDA:82,6,0,
|
|
657
|
+
BRDA:82,6,0,142
|
|
658
658
|
BRDA:82,6,1,1
|
|
659
|
-
BRDA:83,7,0,
|
|
660
|
-
BRDA:83,7,1,
|
|
661
|
-
BRDA:83,7,2,
|
|
659
|
+
BRDA:83,7,0,143
|
|
660
|
+
BRDA:83,7,1,112
|
|
661
|
+
BRDA:83,7,2,28
|
|
662
662
|
BRF:18
|
|
663
663
|
BRH:18
|
|
664
664
|
end_of_record
|
|
@@ -1317,8 +1317,8 @@ FN:53,(anonymous_7)
|
|
|
1317
1317
|
FN:59,(anonymous_8)
|
|
1318
1318
|
FNF:9
|
|
1319
1319
|
FNH:9
|
|
1320
|
-
FNDA:
|
|
1321
|
-
FNDA:
|
|
1320
|
+
FNDA:103,(anonymous_0)
|
|
1321
|
+
FNDA:100,(anonymous_1)
|
|
1322
1322
|
FNDA:813,(anonymous_2)
|
|
1323
1323
|
FNDA:6,(anonymous_3)
|
|
1324
1324
|
FNDA:122,(anonymous_4)
|
|
@@ -1328,13 +1328,13 @@ FNDA:257,(anonymous_7)
|
|
|
1328
1328
|
FNDA:185,(anonymous_8)
|
|
1329
1329
|
DA:4,9
|
|
1330
1330
|
DA:5,9
|
|
1331
|
-
DA:9,
|
|
1331
|
+
DA:9,103
|
|
1332
1332
|
DA:11,8
|
|
1333
1333
|
DA:14,65
|
|
1334
|
-
DA:17,
|
|
1334
|
+
DA:17,29
|
|
1335
1335
|
DA:20,1
|
|
1336
|
-
DA:25,
|
|
1337
|
-
DA:26,
|
|
1336
|
+
DA:25,100
|
|
1337
|
+
DA:26,99
|
|
1338
1338
|
DA:30,813
|
|
1339
1339
|
DA:31,18
|
|
1340
1340
|
DA:34,795
|
|
@@ -1352,7 +1352,7 @@ LF:22
|
|
|
1352
1352
|
LH:22
|
|
1353
1353
|
BRDA:9,0,0,8
|
|
1354
1354
|
BRDA:9,0,1,65
|
|
1355
|
-
BRDA:9,0,2,
|
|
1355
|
+
BRDA:9,0,2,29
|
|
1356
1356
|
BRDA:9,0,3,1
|
|
1357
1357
|
BRDA:30,1,0,18
|
|
1358
1358
|
BRDA:30,1,1,795
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hedia/recommendation-screen",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"description": "Hedia Recommendation Screen for Bolus and Carbohydrates",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"lint": "tslint --project .",
|
|
11
11
|
"lint-fix": "tslint --fix --project .",
|
|
12
12
|
"lint-pkg": "npmPkgJsonLint .",
|
|
13
|
-
"prettier": "
|
|
13
|
+
"prettier": "prettier --check \"src/**/*.{ts,tsx}\"",
|
|
14
14
|
"test": "npm run tsc-clean && jest",
|
|
15
15
|
"test-coverage": "npm run tsc-clean && jest --coverage",
|
|
16
16
|
"tsc": "tsc",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@babel/preset-env": "7.10.2",
|
|
40
40
|
"@babel/preset-react": "7.10.1",
|
|
41
41
|
"@babel/preset-typescript": "7.10.1",
|
|
42
|
-
"@hedia/recommendation-calculator": "2.0.
|
|
42
|
+
"@hedia/recommendation-calculator": "2.0.5",
|
|
43
43
|
"@react-native-community/slider": "3.0.0",
|
|
44
44
|
"@testing-library/jest-native": "3.1.0",
|
|
45
45
|
"@types/jest": "25.2.3",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"jest": "26.0.1",
|
|
57
57
|
"metro-react-native-babel-preset": "0.58.0",
|
|
58
58
|
"npm-package-json-lint": "5.1.0",
|
|
59
|
+
"prettier": "2.2.1",
|
|
59
60
|
"react": "16.13.1",
|
|
60
61
|
"react-native": "0.62.2",
|
|
61
62
|
"react-native-linear-gradient": "2.5.6",
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
"typescript": "4.1.5"
|
|
68
69
|
},
|
|
69
70
|
"dependencies": {
|
|
70
|
-
"@hedia/types": "2.1.
|
|
71
|
+
"@hedia/types": "2.1.18",
|
|
71
72
|
"@lingui/babel-preset-react": "2.9.1",
|
|
72
73
|
"@lingui/cli": "2.9.1",
|
|
73
74
|
"@lingui/macro": "2.9.1",
|
|
@@ -96,13 +96,14 @@ describe(`RecommendedInsulin - Component`, () => {
|
|
|
96
96
|
fireEvent(button, `onPress`);
|
|
97
97
|
});
|
|
98
98
|
test.each `
|
|
99
|
-
value
|
|
100
|
-
${`50`}
|
|
101
|
-
${`
|
|
102
|
-
${`
|
|
103
|
-
${`
|
|
104
|
-
${`
|
|
105
|
-
${`
|
|
99
|
+
value | reduction | isCorrect
|
|
100
|
+
${`50`} | ${0} | ${true}
|
|
101
|
+
${`${SAFETY_INSULIN_LIMIT}`} | ${0} | ${true}
|
|
102
|
+
${`${SAFETY_INSULIN_LIMIT + 1}`} | ${0} | ${false}
|
|
103
|
+
${`24`} | ${0.5} | ${true}
|
|
104
|
+
${`${(SAFETY_INSULIN_LIMIT + 1) * 0.5}`} | ${0.5} | ${false}
|
|
105
|
+
${`10`} | ${0.75} | ${true}
|
|
106
|
+
${`${(SAFETY_INSULIN_LIMIT + 1) * 0.25}`} | ${0.75} | ${false}
|
|
106
107
|
`(`Throws an error at insulin limits`, ({ reduction, isCorrect, value }) => {
|
|
107
108
|
const updateMock = jest.fn();
|
|
108
109
|
const wrapper = render(
|