@hedia/recommendation-screen 2.1.15 → 2.1.17-alpha

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.
Files changed (105) hide show
  1. package/.github/workflows/publish-alpha.yaml +58 -0
  2. package/.github/workflows/publish.yml +3 -0
  3. package/coverage/clover.xml +586 -588
  4. package/coverage/coverage-final.json +27 -27
  5. package/coverage/lcov-report/index.html +7 -7
  6. package/coverage/lcov-report/src/RecommendationScreen.tsx.html +979 -10
  7. package/coverage/lcov-report/src/__tests__/index.html +1 -1
  8. package/coverage/lcov-report/src/__tests__/utils.tsx.html +29 -8
  9. package/coverage/lcov-report/src/components/Header.tsx.html +13 -4
  10. package/coverage/lcov-report/src/components/InfoBars.tsx.html +86 -2
  11. package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +196 -4
  12. package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +20 -2
  13. package/coverage/lcov-report/src/components/LineSeparator.tsx.html +12 -3
  14. package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +30 -3
  15. package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +184 -4
  16. package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +205 -7
  17. package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +187 -19
  18. package/coverage/lcov-report/src/components/Remeasure.tsx.html +114 -3
  19. package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +67 -4
  20. package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +34 -10
  21. package/coverage/lcov-report/src/components/activity/Activity.tsx.html +58 -7
  22. package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +42 -3
  23. package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +30 -6
  24. package/coverage/lcov-report/src/components/activity/index.html +1 -1
  25. package/coverage/lcov-report/src/components/index.html +10 -10
  26. package/coverage/lcov-report/src/components/mood/Emotion.tsx.html +78 -3
  27. package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +80 -5
  28. package/coverage/lcov-report/src/components/mood/index.html +1 -1
  29. package/coverage/lcov-report/src/index.html +1 -1
  30. package/coverage/lcov-report/src/locale/i18nUtils.ts.html +41 -2
  31. package/coverage/lcov-report/src/locale/index.html +1 -1
  32. package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +231 -3
  33. package/coverage/lcov-report/src/utils/Constants.ts.html +71 -2
  34. package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +89 -2
  35. package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +306 -9
  36. package/coverage/lcov-report/src/utils/Translations.ts.html +27 -3
  37. package/coverage/lcov-report/src/utils/Utils.ts.html +278 -2
  38. package/coverage/lcov-report/src/utils/Validations.ts.html +716 -14
  39. package/coverage/lcov-report/src/utils/index.html +1 -1
  40. package/coverage/lcov.info +1158 -1164
  41. package/ignore-git.sh +1 -0
  42. package/ignore-publish.sh +1 -0
  43. package/package.json +5 -3
  44. package/pre-release.sh +5 -0
  45. package/src/RecommendationScreen.d.ts +323 -6
  46. package/src/RecommendationScreen.js +234 -1
  47. package/src/__tests__/RecommendationScreen.test.js +1 -1
  48. package/src/__tests__/utils.d.ts +5 -5
  49. package/src/__tests__/utils.js +1 -1
  50. package/src/components/Header.d.ts +4 -43
  51. package/src/components/Header.js +3 -1
  52. package/src/components/Icon.d.ts +9 -2
  53. package/src/components/Icon.js +6 -1
  54. package/src/components/InfoBars.d.ts +28 -0
  55. package/src/components/InfoBars.js +23 -0
  56. package/src/components/InvisibleNumberInput.d.ts +66 -3
  57. package/src/components/InvisibleNumberInput.js +53 -0
  58. package/src/components/LimitationMessage.d.ts +6 -0
  59. package/src/components/LimitationMessage.js +4 -0
  60. package/src/components/LineSeparator.d.ts +4 -2
  61. package/src/components/LineSeparator.js +2 -0
  62. package/src/components/RecentInsulin.d.ts +10 -2
  63. package/src/components/RecentInsulin.js +7 -0
  64. package/src/components/RecommendationModal.d.ts +61 -3
  65. package/src/components/RecommendationModal.js +45 -0
  66. package/src/components/RecommendedCarbs.d.ts +71 -4
  67. package/src/components/RecommendedCarbs.js +56 -0
  68. package/src/components/RecommendedInsulin.d.ts +66 -4
  69. package/src/components/RecommendedInsulin.js +51 -5
  70. package/src/components/Remeasure.d.ts +38 -2
  71. package/src/components/Remeasure.js +31 -0
  72. package/src/components/TransferToLogbook.d.ts +23 -3
  73. package/src/components/TransferToLogbook.js +18 -0
  74. package/src/components/TwoOptionModal.d.ts +12 -1
  75. package/src/components/TwoOptionModal.js +3 -3
  76. package/src/components/activity/Activity.d.ts +21 -5
  77. package/src/components/activity/Activity.js +14 -0
  78. package/src/components/activity/ActivityIcon.d.ts +15 -0
  79. package/src/components/activity/ActivityIcon.js +14 -1
  80. package/src/components/activity/ActivityIntensity.d.ts +11 -4
  81. package/src/components/activity/ActivityIntensity.js +7 -0
  82. package/src/components/mood/Emotion.d.ts +26 -1
  83. package/src/components/mood/Emotion.js +20 -0
  84. package/src/components/mood/MoodIcon.d.ts +28 -2
  85. package/src/components/mood/MoodIcon.js +20 -2
  86. package/src/locale/i18nUtils.d.ts +13 -0
  87. package/src/locale/i18nUtils.js +13 -0
  88. package/src/types/enum.d.ts +10 -0
  89. package/src/types/enum.js +9 -0
  90. package/src/types/types.d.ts +9 -7
  91. package/src/utils/AttentionMessages.d.ts +65 -0
  92. package/src/utils/AttentionMessages.js +65 -1
  93. package/src/utils/Constants.d.ts +23 -0
  94. package/src/utils/Constants.js +23 -0
  95. package/src/utils/RecommendationError.d.ts +29 -0
  96. package/src/utils/RecommendationError.js +29 -0
  97. package/src/utils/RecommendationUtils.d.ts +98 -6
  98. package/src/utils/RecommendationUtils.js +92 -0
  99. package/src/utils/Translations.d.ts +7 -0
  100. package/src/utils/Translations.js +7 -0
  101. package/src/utils/Utils.d.ts +92 -0
  102. package/src/utils/Utils.js +92 -0
  103. package/src/utils/Validations.d.ts +232 -9
  104. package/src/utils/Validations.js +225 -2
  105. package/typedoc.json +13 -0
@@ -0,0 +1,58 @@
1
+ name: NPM Alpha Publish Bot
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ env:
7
+ SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
8
+ NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
9
+
10
+ jobs:
11
+ publish-alpha-npm-package:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+
16
+ - name: Use Node.js ${{ matrix.node-version }}
17
+ uses: actions/setup-node@v1.4.4
18
+ with:
19
+ node-version: ${{ matrix.node-version }}
20
+
21
+ - name: Register ssh keys
22
+ uses: webfactory/ssh-agent@v0.4.1
23
+ with:
24
+ ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
25
+
26
+ - name: Register NPM access token and in
27
+ run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
28
+
29
+ - name: Installing dependencies
30
+ run: npm ci
31
+
32
+ - id: publish-alpha
33
+ uses: JS-DevTools/npm-publish@v1
34
+ with:
35
+ token: ${{ env.NPM_TOKEN }}
36
+ tag: alpha
37
+
38
+ - if: steps.publish-alpha.outputs.type == 'none'
39
+ run: |
40
+ echo "Package JSON version is already published, please bump the version!"
41
+ exit 1
42
+ - name: Create comment
43
+
44
+ - if: steps.publish-alpha.outputs.type != 'none'
45
+ uses: izhangzhihao/delete-comment@master
46
+ with:
47
+ github_token: ${{ secrets.GITHUB_TOKEN }}
48
+ delete_user_name: github-actions[bot]
49
+ issue_number: ${{ github.event.number }} # remove comments from the current PR
50
+
51
+ - if: steps.publish-alpha.outputs.type != 'none'
52
+ uses: peter-evans/create-or-update-comment@v1
53
+ with:
54
+ issue-number: ${{ github.event.pull_request.number }}
55
+ body: |
56
+ 🎉Successfully released alpha version🎉
57
+ ✅${{ steps.publish-alpha.outputs.version }}✅
58
+
@@ -34,6 +34,9 @@ jobs:
34
34
  - name: Register NPM access token and in
35
35
  run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
36
36
 
37
+ - name: Removing alpha tag from package json
38
+ run: chmod +x ./pre-release.sh && ./pre-release.sh
39
+
37
40
  - name: Installing dependencies
38
41
  run: npm ci
39
42