@hedia/recommendation-screen 2.1.75-alpha.0 → 2.2.0-alpha.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.
Files changed (393) hide show
  1. package/dist/index.d.ts +5 -0
  2. package/dist/index.js +5 -0
  3. package/{lib/typescript → dist/src}/RecommendationScreen.d.ts +68 -82
  4. package/dist/src/RecommendationScreen.js +522 -0
  5. package/dist/src/assets/assets/activity/Cyclist.png +0 -0
  6. package/dist/src/assets/assets/activity/Other.png +0 -0
  7. package/dist/src/assets/assets/activity/Runner.png +0 -0
  8. package/dist/src/assets/assets/activity/Swimmer.png +0 -0
  9. package/dist/src/assets/assets/activity/Walk.png +0 -0
  10. package/dist/src/assets/assets/fonts/Poppins-Bold.ttf +0 -0
  11. package/dist/src/assets/assets/fonts/Poppins-SemiBold.ttf +0 -0
  12. package/dist/src/assets/assets/icons/Edit.tsx +22 -0
  13. package/dist/src/assets/assets/icons/X.tsx +14 -0
  14. package/dist/src/assets/assets/mood/happy.png +0 -0
  15. package/dist/src/assets/assets/mood/happy_active.png +0 -0
  16. package/dist/src/assets/assets/mood/neutral.png +0 -0
  17. package/dist/src/assets/assets/mood/neutral_active.png +0 -0
  18. package/dist/src/assets/assets/mood/sad.png +0 -0
  19. package/dist/src/assets/assets/mood/sad_active.png +0 -0
  20. package/dist/src/assets/assets/mood/semi_happy.png +0 -0
  21. package/dist/src/assets/assets/mood/semi_happy_active.png +0 -0
  22. package/dist/src/assets/assets/mood/semi_sad.png +0 -0
  23. package/dist/src/assets/assets/mood/semi_sad_active.png +0 -0
  24. package/dist/src/assets/icons/Edit.d.ts +4 -0
  25. package/dist/src/assets/icons/Edit.js +7 -0
  26. package/dist/src/assets/icons/X.d.ts +4 -0
  27. package/dist/src/assets/icons/X.js +6 -0
  28. package/dist/src/components/ForecastInfoBar.d.ts +109 -0
  29. package/dist/src/components/ForecastInfoBar.js +138 -0
  30. package/dist/src/components/Header.d.ts +8 -0
  31. package/dist/src/components/Header.js +54 -0
  32. package/dist/src/components/Icon.d.ts +20 -0
  33. package/dist/src/components/Icon.js +43 -0
  34. package/{lib/typescript → dist/src}/components/InfoBars.d.ts +28 -14
  35. package/dist/src/components/InfoBars.js +128 -0
  36. package/{lib/typescript → dist/src}/components/InvisibleNumberInput.d.ts +3 -9
  37. package/dist/src/components/InvisibleNumberInput.js +121 -0
  38. package/dist/src/components/LimitationMessage.d.ts +14 -0
  39. package/dist/src/components/LimitationMessage.js +30 -0
  40. package/{lib/typescript → dist/src}/components/LineSeparator.d.ts +1 -6
  41. package/dist/src/components/LineSeparator.js +18 -0
  42. package/{lib/typescript → dist/src}/components/RecentInsulin.d.ts +1 -3
  43. package/dist/src/components/RecentInsulin.js +73 -0
  44. package/{lib/typescript → dist/src}/components/RecommendationModal.d.ts +63 -63
  45. package/dist/src/components/RecommendationModal.js +226 -0
  46. package/{lib/typescript → dist/src}/components/RecommendedCarbs.d.ts +0 -3
  47. package/dist/src/components/RecommendedCarbs.js +251 -0
  48. package/{lib/typescript → dist/src}/components/RecommendedInsulin.d.ts +1 -2
  49. package/dist/src/components/RecommendedInsulin.js +180 -0
  50. package/{lib/typescript → dist/src}/components/Remeasure.d.ts +15 -6
  51. package/dist/src/components/Remeasure.js +130 -0
  52. package/{lib/typescript/components/TransferToLogbook.d.ts → dist/src/components/SaveButton.d.ts} +2 -3
  53. package/dist/src/components/SaveButton.js +71 -0
  54. package/dist/src/components/TwoOptionModal.d.ts +136 -0
  55. package/dist/src/components/TwoOptionModal.js +141 -0
  56. package/{lib/typescript → dist/src}/components/activity/Activity.d.ts +2 -3
  57. package/dist/src/components/activity/Activity.js +84 -0
  58. package/{lib/typescript → dist/src}/components/activity/ActivityIcon.d.ts +7 -8
  59. package/dist/src/components/activity/ActivityIcon.js +58 -0
  60. package/{lib/typescript → dist/src}/components/activity/ActivityIntensity.d.ts +1 -2
  61. package/dist/src/components/activity/ActivityIntensity.js +58 -0
  62. package/{lib/typescript → dist/src}/components/mood/Emotion.d.ts +1 -2
  63. package/dist/src/components/mood/Emotion.js +64 -0
  64. package/{lib/typescript → dist/src}/components/mood/MoodIcon.d.ts +5 -5
  65. package/dist/src/components/mood/MoodIcon.js +63 -0
  66. package/dist/src/components/text/TextBold.d.ts +8 -0
  67. package/dist/src/components/text/TextBold.js +12 -0
  68. package/dist/src/components/text/TextRegular.d.ts +8 -0
  69. package/dist/src/components/text/TextRegular.js +12 -0
  70. package/dist/src/locale/da/messages.js +1 -0
  71. package/dist/src/locale/da/messages.po +349 -0
  72. package/dist/src/locale/de/messages.js +1 -0
  73. package/dist/src/locale/de/messages.po +349 -0
  74. package/dist/src/locale/en/messages.js +1 -0
  75. package/dist/src/locale/en/messages.po +349 -0
  76. package/dist/src/locale/es/messages.js +1 -0
  77. package/dist/src/locale/es/messages.po +349 -0
  78. package/dist/src/locale/fr/messages.js +1 -0
  79. package/dist/src/locale/fr/messages.po +349 -0
  80. package/dist/src/locale/i18nUtils.d.ts +18 -0
  81. package/dist/src/locale/i18nUtils.js +39 -0
  82. package/dist/src/locale/it/messages.js +1 -0
  83. package/dist/src/locale/it/messages.po +349 -0
  84. package/{lib/typescript → dist/src}/types/enum.d.ts +15 -22
  85. package/dist/src/types/enum.js +145 -0
  86. package/{lib/typescript → dist/src}/types/types.d.ts +0 -1
  87. package/dist/src/types/types.js +1 -0
  88. package/{lib/typescript → dist/src}/utils/AttentionMessages.d.ts +0 -1
  89. package/dist/src/utils/AttentionMessages.js +118 -0
  90. package/{lib/typescript → dist/src}/utils/Constants.d.ts +3 -18
  91. package/{lib/module → dist/src}/utils/Constants.js +21 -79
  92. package/{lib/typescript → dist/src}/utils/RecommendationError.d.ts +0 -1
  93. package/dist/src/utils/RecommendationError.js +63 -0
  94. package/{lib/typescript → dist/src}/utils/RecommendationUtils.d.ts +0 -1
  95. package/{lib/module → dist/src}/utils/RecommendationUtils.js +88 -90
  96. package/{lib/typescript → dist/src}/utils/Translations.d.ts +0 -1
  97. package/{lib/module → dist/src}/utils/Translations.js +5 -7
  98. package/{lib/typescript → dist/src}/utils/Utils.d.ts +1 -2
  99. package/dist/src/utils/Utils.js +141 -0
  100. package/{lib/typescript → dist/src}/utils/Validations.d.ts +1 -2
  101. package/{lib/module → dist/src}/utils/Validations.js +128 -156
  102. package/package.json +96 -109
  103. package/lib/commonjs/RecommendationScreen.js +0 -778
  104. package/lib/commonjs/RecommendationScreen.js.map +0 -1
  105. package/lib/commonjs/assets/IconsSVG/Close.js +0 -20
  106. package/lib/commonjs/assets/IconsSVG/Close.js.map +0 -1
  107. package/lib/commonjs/assets/IconsSVG/CloseOutlined.js +0 -28
  108. package/lib/commonjs/assets/IconsSVG/CloseOutlined.js.map +0 -1
  109. package/lib/commonjs/assets/IconsSVG/Edit.js +0 -23
  110. package/lib/commonjs/assets/IconsSVG/Edit.js.map +0 -1
  111. package/lib/commonjs/assets/IconsSVG/activity/Cycling.js +0 -43
  112. package/lib/commonjs/assets/IconsSVG/activity/Cycling.js.map +0 -1
  113. package/lib/commonjs/assets/IconsSVG/activity/Running.js +0 -33
  114. package/lib/commonjs/assets/IconsSVG/activity/Running.js.map +0 -1
  115. package/lib/commonjs/assets/IconsSVG/activity/Stretching.js +0 -33
  116. package/lib/commonjs/assets/IconsSVG/activity/Stretching.js.map +0 -1
  117. package/lib/commonjs/assets/IconsSVG/activity/Swimming.js +0 -48
  118. package/lib/commonjs/assets/IconsSVG/activity/Swimming.js.map +0 -1
  119. package/lib/commonjs/assets/IconsSVG/activity/Walking.js +0 -38
  120. package/lib/commonjs/assets/IconsSVG/activity/Walking.js.map +0 -1
  121. package/lib/commonjs/assets/IconsSVG/mood/Happy.js +0 -34
  122. package/lib/commonjs/assets/IconsSVG/mood/Happy.js.map +0 -1
  123. package/lib/commonjs/assets/IconsSVG/mood/Neutral.js +0 -34
  124. package/lib/commonjs/assets/IconsSVG/mood/Neutral.js.map +0 -1
  125. package/lib/commonjs/assets/IconsSVG/mood/Sad.js +0 -34
  126. package/lib/commonjs/assets/IconsSVG/mood/Sad.js.map +0 -1
  127. package/lib/commonjs/assets/IconsSVG/mood/SemiHappy.js +0 -34
  128. package/lib/commonjs/assets/IconsSVG/mood/SemiHappy.js.map +0 -1
  129. package/lib/commonjs/assets/IconsSVG/mood/SemiSad.js +0 -34
  130. package/lib/commonjs/assets/IconsSVG/mood/SemiSad.js.map +0 -1
  131. package/lib/commonjs/components/ExitModal.js +0 -124
  132. package/lib/commonjs/components/ExitModal.js.map +0 -1
  133. package/lib/commonjs/components/InfoBars.js +0 -123
  134. package/lib/commonjs/components/InfoBars.js.map +0 -1
  135. package/lib/commonjs/components/InvisibleNumberInput.js +0 -150
  136. package/lib/commonjs/components/InvisibleNumberInput.js.map +0 -1
  137. package/lib/commonjs/components/LineSeparator.js +0 -27
  138. package/lib/commonjs/components/LineSeparator.js.map +0 -1
  139. package/lib/commonjs/components/RecentInsulin.js +0 -105
  140. package/lib/commonjs/components/RecentInsulin.js.map +0 -1
  141. package/lib/commonjs/components/RecommendationModal.js +0 -302
  142. package/lib/commonjs/components/RecommendationModal.js.map +0 -1
  143. package/lib/commonjs/components/RecommendedCarbs.js +0 -289
  144. package/lib/commonjs/components/RecommendedCarbs.js.map +0 -1
  145. package/lib/commonjs/components/RecommendedInsulin.js +0 -209
  146. package/lib/commonjs/components/RecommendedInsulin.js.map +0 -1
  147. package/lib/commonjs/components/Remeasure.js +0 -131
  148. package/lib/commonjs/components/Remeasure.js.map +0 -1
  149. package/lib/commonjs/components/Text.js +0 -25
  150. package/lib/commonjs/components/Text.js.map +0 -1
  151. package/lib/commonjs/components/TimeoutModal.js +0 -113
  152. package/lib/commonjs/components/TimeoutModal.js.map +0 -1
  153. package/lib/commonjs/components/TransferToLogbook.js +0 -83
  154. package/lib/commonjs/components/TransferToLogbook.js.map +0 -1
  155. package/lib/commonjs/components/activity/Activity.js +0 -112
  156. package/lib/commonjs/components/activity/Activity.js.map +0 -1
  157. package/lib/commonjs/components/activity/ActivityIcon.js +0 -86
  158. package/lib/commonjs/components/activity/ActivityIcon.js.map +0 -1
  159. package/lib/commonjs/components/activity/ActivityIntensity.js +0 -65
  160. package/lib/commonjs/components/activity/ActivityIntensity.js.map +0 -1
  161. package/lib/commonjs/components/mood/Emotion.js +0 -86
  162. package/lib/commonjs/components/mood/Emotion.js.map +0 -1
  163. package/lib/commonjs/components/mood/MoodIcon.js +0 -107
  164. package/lib/commonjs/components/mood/MoodIcon.js.map +0 -1
  165. package/lib/commonjs/components/styles/fonts.js +0 -160
  166. package/lib/commonjs/components/styles/fonts.js.map +0 -1
  167. package/lib/commonjs/index.js +0 -21
  168. package/lib/commonjs/index.js.map +0 -1
  169. package/lib/commonjs/locales/da/translations.json +0 -82
  170. package/lib/commonjs/locales/de/translations.json +0 -81
  171. package/lib/commonjs/locales/en/translations.json +0 -84
  172. package/lib/commonjs/locales/es/translations.json +0 -81
  173. package/lib/commonjs/locales/fr/translations.json +0 -81
  174. package/lib/commonjs/locales/it/translations.json +0 -81
  175. package/lib/commonjs/locales/translate.js +0 -63
  176. package/lib/commonjs/locales/translate.js.map +0 -1
  177. package/lib/commonjs/types/enum.js +0 -179
  178. package/lib/commonjs/types/enum.js.map +0 -1
  179. package/lib/commonjs/types/types.js +0 -6
  180. package/lib/commonjs/types/types.js.map +0 -1
  181. package/lib/commonjs/utils/AttentionMessages.js +0 -141
  182. package/lib/commonjs/utils/AttentionMessages.js.map +0 -1
  183. package/lib/commonjs/utils/Constants.js +0 -138
  184. package/lib/commonjs/utils/Constants.js.map +0 -1
  185. package/lib/commonjs/utils/RecommendationError.js +0 -116
  186. package/lib/commonjs/utils/RecommendationError.js.map +0 -1
  187. package/lib/commonjs/utils/RecommendationUtils.js +0 -212
  188. package/lib/commonjs/utils/RecommendationUtils.js.map +0 -1
  189. package/lib/commonjs/utils/Translations.js +0 -22
  190. package/lib/commonjs/utils/Translations.js.map +0 -1
  191. package/lib/commonjs/utils/Utils.js +0 -162
  192. package/lib/commonjs/utils/Utils.js.map +0 -1
  193. package/lib/commonjs/utils/Validations.js +0 -468
  194. package/lib/commonjs/utils/Validations.js.map +0 -1
  195. package/lib/module/RecommendationScreen.js +0 -768
  196. package/lib/module/RecommendationScreen.js.map +0 -1
  197. package/lib/module/assets/IconsSVG/Close.js +0 -11
  198. package/lib/module/assets/IconsSVG/Close.js.map +0 -1
  199. package/lib/module/assets/IconsSVG/CloseOutlined.js +0 -19
  200. package/lib/module/assets/IconsSVG/CloseOutlined.js.map +0 -1
  201. package/lib/module/assets/IconsSVG/Edit.js +0 -14
  202. package/lib/module/assets/IconsSVG/Edit.js.map +0 -1
  203. package/lib/module/assets/IconsSVG/activity/Cycling.js +0 -34
  204. package/lib/module/assets/IconsSVG/activity/Cycling.js.map +0 -1
  205. package/lib/module/assets/IconsSVG/activity/Running.js +0 -24
  206. package/lib/module/assets/IconsSVG/activity/Running.js.map +0 -1
  207. package/lib/module/assets/IconsSVG/activity/Stretching.js +0 -24
  208. package/lib/module/assets/IconsSVG/activity/Stretching.js.map +0 -1
  209. package/lib/module/assets/IconsSVG/activity/Swimming.js +0 -39
  210. package/lib/module/assets/IconsSVG/activity/Swimming.js.map +0 -1
  211. package/lib/module/assets/IconsSVG/activity/Walking.js +0 -29
  212. package/lib/module/assets/IconsSVG/activity/Walking.js.map +0 -1
  213. package/lib/module/assets/IconsSVG/mood/Happy.js +0 -25
  214. package/lib/module/assets/IconsSVG/mood/Happy.js.map +0 -1
  215. package/lib/module/assets/IconsSVG/mood/Neutral.js +0 -25
  216. package/lib/module/assets/IconsSVG/mood/Neutral.js.map +0 -1
  217. package/lib/module/assets/IconsSVG/mood/Sad.js +0 -25
  218. package/lib/module/assets/IconsSVG/mood/Sad.js.map +0 -1
  219. package/lib/module/assets/IconsSVG/mood/SemiHappy.js +0 -25
  220. package/lib/module/assets/IconsSVG/mood/SemiHappy.js.map +0 -1
  221. package/lib/module/assets/IconsSVG/mood/SemiSad.js +0 -25
  222. package/lib/module/assets/IconsSVG/mood/SemiSad.js.map +0 -1
  223. package/lib/module/components/ExitModal.js +0 -114
  224. package/lib/module/components/ExitModal.js.map +0 -1
  225. package/lib/module/components/InfoBars.js +0 -114
  226. package/lib/module/components/InfoBars.js.map +0 -1
  227. package/lib/module/components/InvisibleNumberInput.js +0 -142
  228. package/lib/module/components/InvisibleNumberInput.js.map +0 -1
  229. package/lib/module/components/LineSeparator.js +0 -19
  230. package/lib/module/components/LineSeparator.js.map +0 -1
  231. package/lib/module/components/RecentInsulin.js +0 -97
  232. package/lib/module/components/RecentInsulin.js.map +0 -1
  233. package/lib/module/components/RecommendationModal.js +0 -291
  234. package/lib/module/components/RecommendationModal.js.map +0 -1
  235. package/lib/module/components/RecommendedCarbs.js +0 -281
  236. package/lib/module/components/RecommendedCarbs.js.map +0 -1
  237. package/lib/module/components/RecommendedInsulin.js +0 -201
  238. package/lib/module/components/RecommendedInsulin.js.map +0 -1
  239. package/lib/module/components/Remeasure.js +0 -123
  240. package/lib/module/components/Remeasure.js.map +0 -1
  241. package/lib/module/components/Text.js +0 -16
  242. package/lib/module/components/Text.js.map +0 -1
  243. package/lib/module/components/TimeoutModal.js +0 -103
  244. package/lib/module/components/TimeoutModal.js.map +0 -1
  245. package/lib/module/components/TransferToLogbook.js +0 -75
  246. package/lib/module/components/TransferToLogbook.js.map +0 -1
  247. package/lib/module/components/activity/Activity.js +0 -104
  248. package/lib/module/components/activity/Activity.js.map +0 -1
  249. package/lib/module/components/activity/ActivityIcon.js +0 -78
  250. package/lib/module/components/activity/ActivityIcon.js.map +0 -1
  251. package/lib/module/components/activity/ActivityIntensity.js +0 -57
  252. package/lib/module/components/activity/ActivityIntensity.js.map +0 -1
  253. package/lib/module/components/mood/Emotion.js +0 -78
  254. package/lib/module/components/mood/Emotion.js.map +0 -1
  255. package/lib/module/components/mood/MoodIcon.js +0 -97
  256. package/lib/module/components/mood/MoodIcon.js.map +0 -1
  257. package/lib/module/components/styles/fonts.js +0 -152
  258. package/lib/module/components/styles/fonts.js.map +0 -1
  259. package/lib/module/index.js +0 -5
  260. package/lib/module/index.js.map +0 -1
  261. package/lib/module/locales/da/translations.json +0 -82
  262. package/lib/module/locales/de/translations.json +0 -81
  263. package/lib/module/locales/en/translations.json +0 -84
  264. package/lib/module/locales/es/translations.json +0 -81
  265. package/lib/module/locales/fr/translations.json +0 -81
  266. package/lib/module/locales/it/translations.json +0 -81
  267. package/lib/module/locales/translate.js +0 -55
  268. package/lib/module/locales/translate.js.map +0 -1
  269. package/lib/module/types/enum.js +0 -170
  270. package/lib/module/types/enum.js.map +0 -1
  271. package/lib/module/types/types.js +0 -2
  272. package/lib/module/types/types.js.map +0 -1
  273. package/lib/module/utils/AttentionMessages.js +0 -131
  274. package/lib/module/utils/AttentionMessages.js.map +0 -1
  275. package/lib/module/utils/Constants.js.map +0 -1
  276. package/lib/module/utils/RecommendationError.js +0 -87
  277. package/lib/module/utils/RecommendationError.js.map +0 -1
  278. package/lib/module/utils/RecommendationUtils.js.map +0 -1
  279. package/lib/module/utils/Translations.js.map +0 -1
  280. package/lib/module/utils/Utils.js +0 -155
  281. package/lib/module/utils/Utils.js.map +0 -1
  282. package/lib/module/utils/Validations.js.map +0 -1
  283. package/lib/typescript/RecommendationScreen.d.ts.map +0 -1
  284. package/lib/typescript/assets/IconsSVG/Close.d.ts +0 -5
  285. package/lib/typescript/assets/IconsSVG/Close.d.ts.map +0 -1
  286. package/lib/typescript/assets/IconsSVG/CloseOutlined.d.ts +0 -5
  287. package/lib/typescript/assets/IconsSVG/CloseOutlined.d.ts.map +0 -1
  288. package/lib/typescript/assets/IconsSVG/Edit.d.ts +0 -5
  289. package/lib/typescript/assets/IconsSVG/Edit.d.ts.map +0 -1
  290. package/lib/typescript/assets/IconsSVG/activity/Cycling.d.ts +0 -5
  291. package/lib/typescript/assets/IconsSVG/activity/Cycling.d.ts.map +0 -1
  292. package/lib/typescript/assets/IconsSVG/activity/Running.d.ts +0 -5
  293. package/lib/typescript/assets/IconsSVG/activity/Running.d.ts.map +0 -1
  294. package/lib/typescript/assets/IconsSVG/activity/Stretching.d.ts +0 -5
  295. package/lib/typescript/assets/IconsSVG/activity/Stretching.d.ts.map +0 -1
  296. package/lib/typescript/assets/IconsSVG/activity/Swimming.d.ts +0 -5
  297. package/lib/typescript/assets/IconsSVG/activity/Swimming.d.ts.map +0 -1
  298. package/lib/typescript/assets/IconsSVG/activity/Walking.d.ts +0 -5
  299. package/lib/typescript/assets/IconsSVG/activity/Walking.d.ts.map +0 -1
  300. package/lib/typescript/assets/IconsSVG/mood/Happy.d.ts +0 -5
  301. package/lib/typescript/assets/IconsSVG/mood/Happy.d.ts.map +0 -1
  302. package/lib/typescript/assets/IconsSVG/mood/Neutral.d.ts +0 -5
  303. package/lib/typescript/assets/IconsSVG/mood/Neutral.d.ts.map +0 -1
  304. package/lib/typescript/assets/IconsSVG/mood/Sad.d.ts +0 -5
  305. package/lib/typescript/assets/IconsSVG/mood/Sad.d.ts.map +0 -1
  306. package/lib/typescript/assets/IconsSVG/mood/SemiHappy.d.ts +0 -5
  307. package/lib/typescript/assets/IconsSVG/mood/SemiHappy.d.ts.map +0 -1
  308. package/lib/typescript/assets/IconsSVG/mood/SemiSad.d.ts +0 -5
  309. package/lib/typescript/assets/IconsSVG/mood/SemiSad.d.ts.map +0 -1
  310. package/lib/typescript/components/ExitModal.d.ts +0 -26
  311. package/lib/typescript/components/ExitModal.d.ts.map +0 -1
  312. package/lib/typescript/components/InfoBars.d.ts.map +0 -1
  313. package/lib/typescript/components/InvisibleNumberInput.d.ts.map +0 -1
  314. package/lib/typescript/components/LineSeparator.d.ts.map +0 -1
  315. package/lib/typescript/components/RecentInsulin.d.ts.map +0 -1
  316. package/lib/typescript/components/RecommendationModal.d.ts.map +0 -1
  317. package/lib/typescript/components/RecommendedCarbs.d.ts.map +0 -1
  318. package/lib/typescript/components/RecommendedInsulin.d.ts.map +0 -1
  319. package/lib/typescript/components/Remeasure.d.ts.map +0 -1
  320. package/lib/typescript/components/Text.d.ts +0 -14
  321. package/lib/typescript/components/Text.d.ts.map +0 -1
  322. package/lib/typescript/components/TimeoutModal.d.ts +0 -25
  323. package/lib/typescript/components/TimeoutModal.d.ts.map +0 -1
  324. package/lib/typescript/components/TransferToLogbook.d.ts.map +0 -1
  325. package/lib/typescript/components/activity/Activity.d.ts.map +0 -1
  326. package/lib/typescript/components/activity/ActivityIcon.d.ts.map +0 -1
  327. package/lib/typescript/components/activity/ActivityIntensity.d.ts.map +0 -1
  328. package/lib/typescript/components/mood/Emotion.d.ts.map +0 -1
  329. package/lib/typescript/components/mood/MoodIcon.d.ts.map +0 -1
  330. package/lib/typescript/components/styles/fonts.d.ts +0 -151
  331. package/lib/typescript/components/styles/fonts.d.ts.map +0 -1
  332. package/lib/typescript/index.d.ts +0 -5
  333. package/lib/typescript/index.d.ts.map +0 -1
  334. package/lib/typescript/locales/translate.d.ts +0 -20
  335. package/lib/typescript/locales/translate.d.ts.map +0 -1
  336. package/lib/typescript/types/enum.d.ts.map +0 -1
  337. package/lib/typescript/types/types.d.ts.map +0 -1
  338. package/lib/typescript/utils/AttentionMessages.d.ts.map +0 -1
  339. package/lib/typescript/utils/Constants.d.ts.map +0 -1
  340. package/lib/typescript/utils/RecommendationError.d.ts.map +0 -1
  341. package/lib/typescript/utils/RecommendationUtils.d.ts.map +0 -1
  342. package/lib/typescript/utils/Translations.d.ts.map +0 -1
  343. package/lib/typescript/utils/Utils.d.ts.map +0 -1
  344. package/lib/typescript/utils/Validations.d.ts.map +0 -1
  345. package/src/RecommendationScreen.tsx +0 -854
  346. package/src/assets/IconsSVG/Close.tsx +0 -13
  347. package/src/assets/IconsSVG/CloseOutlined.tsx +0 -23
  348. package/src/assets/IconsSVG/Edit.tsx +0 -16
  349. package/src/assets/IconsSVG/activity/Cycling.tsx +0 -41
  350. package/src/assets/IconsSVG/activity/Running.tsx +0 -29
  351. package/src/assets/IconsSVG/activity/Stretching.tsx +0 -29
  352. package/src/assets/IconsSVG/activity/Swimming.tsx +0 -47
  353. package/src/assets/IconsSVG/activity/Walking.tsx +0 -35
  354. package/src/assets/IconsSVG/mood/Happy.tsx +0 -30
  355. package/src/assets/IconsSVG/mood/Neutral.tsx +0 -30
  356. package/src/assets/IconsSVG/mood/Sad.tsx +0 -30
  357. package/src/assets/IconsSVG/mood/SemiHappy.tsx +0 -30
  358. package/src/assets/IconsSVG/mood/SemiSad.tsx +0 -30
  359. package/src/components/ExitModal.tsx +0 -134
  360. package/src/components/InfoBars.tsx +0 -122
  361. package/src/components/InvisibleNumberInput.tsx +0 -170
  362. package/src/components/LineSeparator.tsx +0 -29
  363. package/src/components/RecentInsulin.tsx +0 -109
  364. package/src/components/RecommendationModal.tsx +0 -319
  365. package/src/components/RecommendedCarbs.tsx +0 -303
  366. package/src/components/RecommendedInsulin.tsx +0 -220
  367. package/src/components/Remeasure.tsx +0 -135
  368. package/src/components/Text.tsx +0 -27
  369. package/src/components/TimeoutModal.tsx +0 -121
  370. package/src/components/TransferToLogbook.tsx +0 -92
  371. package/src/components/activity/Activity.tsx +0 -107
  372. package/src/components/activity/ActivityIcon.tsx +0 -77
  373. package/src/components/activity/ActivityIntensity.tsx +0 -67
  374. package/src/components/mood/Emotion.tsx +0 -97
  375. package/src/components/mood/MoodIcon.tsx +0 -91
  376. package/src/components/styles/fonts.ts +0 -151
  377. package/src/index.ts +0 -5
  378. package/src/locales/da/translations.json +0 -82
  379. package/src/locales/de/translations.json +0 -81
  380. package/src/locales/en/translations.json +0 -84
  381. package/src/locales/es/translations.json +0 -81
  382. package/src/locales/fr/translations.json +0 -81
  383. package/src/locales/it/translations.json +0 -81
  384. package/src/locales/translate.ts +0 -62
  385. package/src/types/enum.ts +0 -164
  386. package/src/types/types.ts +0 -19
  387. package/src/utils/AttentionMessages.ts +0 -167
  388. package/src/utils/Constants.ts +0 -77
  389. package/src/utils/RecommendationError.ts +0 -182
  390. package/src/utils/RecommendationUtils.ts +0 -232
  391. package/src/utils/Translations.ts +0 -17
  392. package/src/utils/Utils.ts +0 -156
  393. package/src/utils/Validations.ts +0 -490
@@ -1,114 +0,0 @@
1
- import React from "react";
2
- import { StyleSheet, View } from "react-native";
3
- import { BloodGlucoseUnit, BloodKetonesUnit } from "@hedia/types";
4
- import { t } from "../locales/translate";
5
- import { colors } from "../utils/Constants";
6
- import { Utils } from "../utils/Utils";
7
- import { FONTS } from "./styles/fonts";
8
- import Text from "./Text";
9
- /** A standard panel to display some data that the user entered. */
10
- export default class InfoBars extends React.Component {
11
- /**
12
- * Determine the value to be displayed in the infobar.
13
- *
14
- * Steps:
15
- * 1. Unpack showNullAsDash, unit, and value from props.
16
- * 2. Set noDecimal to be true if unit is BloodGlucoseUnit.MG_DL or if unit is BloodKetonesUnit.MG_DL.
17
- * 3. Set nullPlaceholder to be ‘-' if noDecimal is true and to '-.-’ otherwise.
18
- * 4. Return value if it is not null or undefined. Otherwise, if showNullAsDash is true then return nullPlaceholder, otherwise return the string '0'.
19
- * @returns The string to display as the value in the infobar.
20
- */
21
- displayValue = () => {
22
- const {
23
- showNullAsDash,
24
- unit,
25
- value
26
- } = this.props;
27
- const noDecimal = unit === BloodGlucoseUnit.MG_DL || unit === BloodKetonesUnit.MG_DL;
28
- const nullPlaceholder = noDecimal || !unit ? `-` : `-.-`;
29
- return value ?? (showNullAsDash ? nullPlaceholder : `0`);
30
- };
31
-
32
- /**
33
- * Determine the unit string to be displayed in the infobar.
34
- *
35
- * Steps:
36
- * 1. Unpack unit from props.
37
- * 2. Return unit if unit is “units” or the result of calling formatUnit() with unit as argument otherwise.
38
- * @returns The string to display as the unit in the infobar
39
- */
40
- displayUnit = () => {
41
- const {
42
- unit
43
- } = this.props;
44
- if (!unit) {
45
- return null;
46
- }
47
- return unit === t(`units`) ? unit : Utils.formatUnit(unit);
48
- };
49
-
50
- /**
51
- * @returns JSX element to display a card with the entered value.
52
- */
53
- render() {
54
- const {
55
- testID
56
- } = this.props;
57
- return /*#__PURE__*/React.createElement(View, {
58
- style: infoStyles.container
59
- }, /*#__PURE__*/React.createElement(View, {
60
- style: infoStyles.labelContainer
61
- }, /*#__PURE__*/React.createElement(Text, {
62
- style: infoStyles.label
63
- }, this.props.label)), /*#__PURE__*/React.createElement(View, {
64
- style: infoStyles.valueUnitContainer
65
- }, /*#__PURE__*/React.createElement(Text, {
66
- style: infoStyles.value,
67
- testID: testID?.valueID
68
- }, this.displayValue()), /*#__PURE__*/React.createElement(Text, {
69
- style: {
70
- ...infoStyles.units,
71
- paddingLeft: this.props.unit === null ? 0 : 4
72
- },
73
- testID: testID?.unitID
74
- }, this.displayUnit())));
75
- }
76
- }
77
-
78
- /** @internal */
79
- export const infoStyles = StyleSheet.create({
80
- container: {
81
- flex: 1,
82
- flexDirection: `row`,
83
- marginBottom: 8,
84
- padding: 16,
85
- borderWidth: 1,
86
- borderColor: colors.dustyDarkBlue,
87
- borderRadius: 5,
88
- alignItems: `center`
89
- },
90
- labelContainer: {
91
- flex: 7,
92
- justifyContent: `flex-start`
93
- },
94
- label: {
95
- ...FONTS.Poppins.regular_Base,
96
- color: colors.white
97
- },
98
- valueUnitContainer: {
99
- flex: 6.5,
100
- justifyContent: `flex-end`,
101
- alignItems: `baseline`,
102
- flexDirection: `row`
103
- },
104
- value: {
105
- ...FONTS.Poppins.medium_2XL,
106
- color: colors.white
107
- },
108
- units: {
109
- ...FONTS.Poppins.regular_XS,
110
- color: colors.white,
111
- paddingLeft: 4
112
- }
113
- });
114
- //# sourceMappingURL=InfoBars.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","StyleSheet","View","BloodGlucoseUnit","BloodKetonesUnit","t","colors","Utils","FONTS","Text","InfoBars","Component","displayValue","showNullAsDash","unit","value","props","noDecimal","MG_DL","nullPlaceholder","displayUnit","formatUnit","render","testID","createElement","style","infoStyles","container","labelContainer","label","valueUnitContainer","valueID","units","paddingLeft","unitID","create","flex","flexDirection","marginBottom","padding","borderWidth","borderColor","dustyDarkBlue","borderRadius","alignItems","justifyContent","Poppins","regular_Base","color","white","medium_2XL","regular_XS"],"sourceRoot":"../../../src","sources":["components/InfoBars.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KAAK,EAAE1C,MAAM,CAAC2C;EACf,CAAC;EACDnB,kBAAkB,EAAE;IACnBM,IAAI,EAAE,GAAG;IACTS,cAAc,EAAG,UAAS;IAC1BD,UAAU,EAAG,UAAS;IACtBP,aAAa,EAAG;EACjB,CAAC;EACDtB,KAAK,EAAE;IACN,GAAGP,KAAK,CAACsC,OAAO,CAACI,UAAU;IAC3BF,KAAK,EAAE1C,MAAM,CAAC2C;EACf,CAAC;EACDjB,KAAK,EAAE;IACN,GAAGxB,KAAK,CAACsC,OAAO,CAACK,UAAU;IAC3BH,KAAK,EAAE1C,MAAM,CAAC2C,KAAK;IACnBhB,WAAW,EAAE;EACd;AACD,CAAC,CAAC"}
@@ -1,142 +0,0 @@
1
- import React from "react";
2
- import { Keyboard, StyleSheet, TextInput } from "react-native";
3
- /**
4
- * InvisibleNumberInput is used to enable numerical input by the user without displaying a traditional input field on the screen.
5
- * Since the input field is made invisible and thus can’t be tapped directly by the user we need to be able to call
6
- * its focus() method from the parent component in order to activate the input field and show the keyboard.
7
- * We do this by defining a function that calls the input field’s focus() method inside the InvisibleNumberInput component when it has been mounted.
8
- * This function is then passed to the parent by giving it as the argument for a callback function named visible.
9
- */
10
- export default class InvisibleNumberInput extends React.Component {
11
- keyboardDidHideSubscription = null;
12
- inputRef = null;
13
- constructor(props) {
14
- super(props);
15
- this.inputRef = /*#__PURE__*/React.createRef();
16
- }
17
-
18
- /** Initialise the state value variable with `0` */
19
- state = {
20
- value: `0`
21
- };
22
-
23
- /**
24
- * Called immediately after a component is mounted. Setting state here will trigger re-rendering.
25
- * Perform various initialisation steps:
26
- * 1. Set the value state of the component to the startValue prop (or to '0' if it is undefined)
27
- * 2. Call the visible callback function using an anonymous function as argument. The anonymous function shall do the following:
28
- * - Set the value state of the InvisibleNumberInput component to the startValue prop (or to '0' if it is undefined)
29
- * - Return the value from calling the focus() method on the input field.
30
- */
31
- componentDidMount() {
32
- this.keyboardDidHideSubscription = Keyboard.addListener(`keyboardDidHide`, this.callOnTextInputsBlur);
33
- this.setState({
34
- value: this.props.startValue ?? `0`
35
- });
36
- this.props.visible(() => {
37
- this.setState({
38
- value: this.props.startValue ?? `0`
39
- });
40
- return this.inputRef?.current?.focus();
41
- });
42
- }
43
-
44
- /**
45
- * Call the blur method on the TextInput component.
46
- */
47
- callOnTextInputsBlur = () => {
48
- this.inputRef?.current?.blur();
49
- };
50
-
51
- /**
52
- * Sanitise a user-entered value by removing invalid characters
53
- *
54
- * Steps:
55
- * 1. Use regular expressions to make the following manipulations to the text argument in the defined order and save the result to a local string variable named replaced.
56
- * - Replace any commas with periods
57
- * - Remove any characters that comes after two groups of zero or more digits separated by a period.
58
- * 2. Define a function named round that rounds a given string that contains a number to have the amount of decimals given by the decimalPlaces prop. Return the result as a string.
59
- * 3. If the value of the replaced variable from step 1 is not a NaN (not a number) when converted to a Number type then use the round function defined in step 2 on replaced and return the result
60
- * 4. (If the NaN-check from step 2 didn’t fail) return the string '0'.
61
- * @param text The string input to clean up
62
- * @returns A string with the cleaned text.
63
- */
64
- cleanInput = text => {
65
- const replaced = text.replace(/,/g, `.`).replace(/(\d*\.\d*).*/, `$1`);
66
- const round = value => {
67
- const temp = Number(value) * Math.pow(10, this.props.decimalPlaces);
68
- const rounded = Math.round(temp) / Math.pow(10, this.props.decimalPlaces);
69
- return rounded.toFixed(this.props.decimalPlaces);
70
- };
71
- if (!isNaN(Number(replaced))) {
72
- return round(replaced);
73
- }
74
- return `0`;
75
- };
76
-
77
- /**
78
- * Handle what happens when the text in the input field is being changed.
79
- * That includes cleaning the text a little and then saving the value and potentially calling a callback function.
80
- *
81
- * Steps:
82
- * 1. If the cleanPartialInput prop is true, use the cleanInput() method to to clean the content of the text argument and save it to a variable named cleaned.
83
- * Otherwise just replace any commas in the text argument with periods and save the result to the same variable.
84
- * 2. Remove repeated periods from the text in the cleaned variable and save the the result in a new variable named replacedSeparator.
85
- * 3. Set the value state of the component to replacedSeparator.
86
- * 4. If the partialInput callback function prop is defined, call it with replacedSeparator as argument.
87
- * @param text The updated text in the input field
88
- */
89
- handleOnChangeText = text => {
90
- const cleaned = this.props.cleanPartialInput ? this.cleanInput(text) : text.replace(/,/g, `.`);
91
- let replacedSeparator = cleaned.replace(/\.+/g, `.`).replace(/(\d*\.\d*).*/, `$1`);
92
- if (!this.props.negativeAllowed) {
93
- replacedSeparator = replacedSeparator.replace(/[^0-9.]/g, ``);
94
- }
95
- this.setState({
96
- value: `${replacedSeparator}`
97
- });
98
- this.props.partialInput?.(`${replacedSeparator}`);
99
- };
100
-
101
- /**
102
- * Handle what should happen when the user finish editing the input field.
103
- *
104
- * Steps:
105
- * 1. Use the cleanInput() method on the value state and store the result in a variable named cleaned.
106
- * 2. If the onEnd prop is not null, then convert the value of cleaned to a number and use it as an argument to call the onEnd prop function.
107
- */
108
- onEndEdit = () => {
109
- const cleaned = this.cleanInput(this.state.value);
110
- this.props.onEnd?.(Number(cleaned));
111
- };
112
-
113
- /**
114
- * @returns JSX element to display a TextInput field with the component’s value state as its value
115
- * and the handleOnChangeText() and onEndEdit() methods as the textInput’s onChangeText and onEndEditing respectively.
116
- */
117
- render() {
118
- const {
119
- testID
120
- } = this.props;
121
- return /*#__PURE__*/React.createElement(TextInput, {
122
- testID: testID,
123
- value: this.state.value,
124
- ref: this.inputRef,
125
- style: inputStyles.input,
126
- keyboardType: `numeric`,
127
- returnKeyType: `done`,
128
- onChangeText: this.handleOnChangeText,
129
- onEndEditing: this.onEndEdit,
130
- maxLength: this.props.maxLength,
131
- selectTextOnFocus: true
132
- });
133
- }
134
- }
135
- const inputStyles = StyleSheet.create({
136
- input: {
137
- width: 1,
138
- height: 1,
139
- opacity: 0
140
- }
141
- });
142
- //# sourceMappingURL=InvisibleNumberInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","Keyboard","StyleSheet","TextInput","InvisibleNumberInput","Component","keyboardDidHideSubscription","inputRef","constructor","props","createRef","state","value","componentDidMount","addListener","callOnTextInputsBlur","setState","startValue","visible","current","focus","blur","cleanInput","text","replaced","replace","round","temp","Number","Math","pow","decimalPlaces","rounded","toFixed","isNaN","handleOnChangeText","cleaned","cleanPartialInput","replacedSeparator","negativeAllowed","partialInput","onEndEdit","onEnd","render","testID","createElement","ref","style","inputStyles","input","keyboardType","returnKeyType","onChangeText","onEndEditing","maxLength","selectTextOnFocus","create","width","height","opacity"],"sourceRoot":"../../../src","sources":["components/InvisibleNumberInput.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA8BC,QAAQ,EAAEC,UAAU,EAAEC,SAAS,QAAQ,cAAc;AA4BnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMC,oBAAoB,SAASJ,KAAK,CAACK,SAAS,CAAiB;EACjFC,2BAA2B,GAA+B,IAAI;EAC9DC,QAAQ,GAAsC,IAAI;EAClDC,WAAWA,CAACC,KAAa,EAAE;IAC1B,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACF,QAAQ,gBAAGP,KAAK,CAACU,SAAS,CAAY,CAAC;EAC7C;;EAEA;EACOC,KAAK,GAAW;IACtBC,KAAK,EAAG;EACT,CAAC;;EAED;AACD;AACA;AACA;AACA;AACA;AACA;AACA;EACQC,iBAAiBA,CAAA,EAAS;IAChC,IAAI,CAACP,2BAA2B,GAAGL,QAAQ,CAACa,WAAW,CAAE,iBAAgB,EAAE,IAAI,CAACC,oBAAoB,CAAC;IACrG,IAAI,CAACC,QAAQ,CAAC;MACbJ,KAAK,EAAE,IAAI,CAACH,KAAK,CAACQ,UAAU,IAAK;IAClC,CAAC,CAAC;IACF,IAAI,CAACR,KAAK,CAACS,OAAO,CAAC,MAAY;MAC9B,IAAI,CAACF,QAAQ,CAAC;QACbJ,KAAK,EAAE,IAAI,CAACH,KAAK,CAACQ,UAAU,IAAK;MAClC,CAAC,CAAC;MACF,OAAO,IAAI,CAACV,QAAQ,EAAEY,OAAO,EAAEC,KAAK,CAAC,CAAC;IACvC,CAAC,CAAC;EACH;;EAEA;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AAC;IACTC,OAAO,EAAE;EACV;AACD,CAAC,CAAC"}
@@ -1,19 +0,0 @@
1
- import React from "react";
2
- import { StyleSheet, View } from "react-native";
3
- /** Display a horizontal line for visually separating elements in the user interface. */
4
- export default class LineSeparator extends React.Component {
5
- /** @return JSX element for displaying a thin horizontal line in the given color. */
6
- render() {
7
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
8
- style: [lineSeparatorStyles.lineStyle, {
9
- ...this.props
10
- }]
11
- }));
12
- }
13
- }
14
- const lineSeparatorStyles = StyleSheet.create({
15
- lineStyle: {
16
- borderBottomWidth: 1
17
- }
18
- });
19
- //# sourceMappingURL=LineSeparator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","StyleSheet","View","LineSeparator","Component","render","createElement","Fragment","style","lineSeparatorStyles","lineStyle","props","create","borderBottomWidth"],"sourceRoot":"../../../src","sources":["components/LineSeparator.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAW/C;AACA,eAAe,MAAMC,aAAa,SAASH,KAAK,CAACI,SAAS,CAAS;EAClE;EACOC,MAAMA,CAAA,EAAgB;IAC5B,oBACCL,KAAA,CAAAM,aAAA,CAACN,KAAK,CAACO,QAAQ,qBACdP,KAAA,CAAAM,aAAA,CAACJ,IAAI;MAACM,KAAK,EAAE,CAACC,mBAAmB,CAACC,SAAS,EAAE;QAAE,GAAG,IAAI,CAACC;MAAM,CAAC;IAAE,CAAE,CACnD,CAAC;EAEnB;AACD;AAEA,MAAMF,mBAAmB,GAAGR,UAAU,CAACW,MAAM,CAAC;EAC7CF,SAAS,EAAE;IACVG,iBAAiB,EAAE;EACpB;AACD,CAAC,CAAC"}
@@ -1,97 +0,0 @@
1
- import React from "react";
2
- import { StyleSheet, TouchableOpacity, View } from "react-native";
3
- import { t } from "../locales/translate";
4
- import { Testing } from "../types/enum";
5
- import { colors } from "../utils/Constants";
6
- import { FONTS } from "./styles/fonts";
7
- import Text from "./Text";
8
- /** Display a card that prompts the user to recall if they injected insulin recently. */
9
- export default class RecentInsulin extends React.Component {
10
- /**
11
- *
12
- * @returns JSX element that displays a card with the question “Have you taken insulin within the last 4 hours?
13
- * Along with two buttons labeled “Yes” and “No” respectively.
14
- * If the user taps the “Yes” button, the onRecentInsulinYes prop callback function should be called.
15
- * If the user taps the “No” button, the onRecentInsulinNo prop callback function should be called.
16
- */
17
- render = () => {
18
- return /*#__PURE__*/React.createElement(View, {
19
- style: recentInsulinStyles.container
20
- }, /*#__PURE__*/React.createElement(View, {
21
- style: recentInsulinStyles.textContainer
22
- }, /*#__PURE__*/React.createElement(Text, {
23
- style: recentInsulinStyles.recommended
24
- }, t(`Recommended amount of insulin`)), /*#__PURE__*/React.createElement(Text, {
25
- style: recentInsulinStyles.takenInsulin
26
- }, t(`Have you taken insulin within the last 4 hours?`))), /*#__PURE__*/React.createElement(View, {
27
- style: recentInsulinStyles.buttonContainer
28
- }, /*#__PURE__*/React.createElement(TouchableOpacity, {
29
- testID: Testing.Id.RecentInsulinTestIds.Yes,
30
- onPress: this.props.onRecentInsulinYes,
31
- style: recentInsulinStyles.yesButton
32
- }, /*#__PURE__*/React.createElement(Text, {
33
- style: recentInsulinStyles.yesNoText
34
- }, t(`Yes`))), /*#__PURE__*/React.createElement(TouchableOpacity, {
35
- testID: Testing.Id.RecentInsulinTestIds.No,
36
- onPress: this.props.onRecentInsulinNo,
37
- style: recentInsulinStyles.noButton
38
- }, /*#__PURE__*/React.createElement(Text, {
39
- style: recentInsulinStyles.yesNoText
40
- }, t(`No`)))));
41
- };
42
- }
43
- const recentInsulinStyles = StyleSheet.create({
44
- container: {
45
- minHeight: 220,
46
- backgroundColor: colors.deepPurple,
47
- borderRadius: 5,
48
- marginBottom: 32,
49
- paddingHorizontal: 16,
50
- paddingTop: 16,
51
- paddingBottom: 50
52
- },
53
- textContainer: {
54
- justifyContent: `center`,
55
- alignItems: `center`,
56
- marginBottom: 32
57
- },
58
- recommended: {
59
- ...FONTS.Poppins.medium_Base,
60
- color: colors.white,
61
- textAlign: `center`,
62
- marginBottom: 2
63
- },
64
- takenInsulin: {
65
- ...FONTS.Poppins.regular_SM,
66
- color: colors.white,
67
- textAlign: `center`
68
- },
69
- buttonContainer: {
70
- flexDirection: `row`,
71
- justifyContent: `center`
72
- },
73
- yesButton: {
74
- flex: 1,
75
- borderRadius: 50,
76
- minWidth: 127,
77
- marginLeft: 30,
78
- marginRight: 12,
79
- backgroundColor: colors.teal
80
- },
81
- noButton: {
82
- flex: 1,
83
- borderRadius: 50,
84
- minWidth: 127,
85
- marginRight: 30,
86
- marginLeft: 12,
87
- backgroundColor: colors.teal
88
- },
89
- yesNoText: {
90
- ...FONTS.Poppins.bold_Base,
91
- textAlign: `center`,
92
- paddingHorizontal: 16,
93
- paddingVertical: 12,
94
- color: colors.black
95
- }
96
- });
97
- //# sourceMappingURL=RecentInsulin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","StyleSheet","TouchableOpacity","View","t","Testing","colors","FONTS","Text","RecentInsulin","Component","render","createElement","style","recentInsulinStyles","container","textContainer","recommended","takenInsulin","buttonContainer","testID","Id","RecentInsulinTestIds","Yes","onPress","props","onRecentInsulinYes","yesButton","yesNoText","No","onRecentInsulinNo","noButton","create","minHeight","backgroundColor","deepPurple","borderRadius","marginBottom","paddingHorizontal","paddingTop","paddingBottom","justifyContent","alignItems","Poppins","medium_Base","color","white","textAlign","regular_SM","flexDirection","flex","minWidth","marginLeft","marginRight","teal","bold_Base","paddingVertical","black"],"sourceRoot":"../../../src","sources":["components/RecentInsulin.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAEjE,SAASC,CAAC,QAAQ,sBAAsB;AACxC,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SA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