@hedia/recommendation-screen 1.0.7 → 1.1.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 (91) hide show
  1. package/android/app/src/main/res/values/color.xml +3 -0
  2. package/android/app/src/main/res/values/styles.xml +3 -0
  3. package/index.ts +3 -16
  4. package/ios/HediaRecommendationScreen/Info.plist +80 -57
  5. package/ios/HediaRecommendationScreen.xcodeproj/project.pbxproj +1085 -807
  6. package/ios/HediaRecommendationScreen.xcworkspace/contents.xcworkspacedata +10 -0
  7. package/ios/HediaRecommendationScreen.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  8. package/ios/Podfile +106 -104
  9. package/ios/Podfile.lock +474 -0
  10. package/jest.mock.js +1 -0
  11. package/package.json +9 -2
  12. package/src/RecommendationScreen.tsx +130 -60
  13. package/src/assets/activity/Cyclist.png +0 -0
  14. package/src/assets/activity/Other.png +0 -0
  15. package/src/assets/activity/Runner.png +0 -0
  16. package/src/assets/activity/Swimmer.png +0 -0
  17. package/src/assets/activity/Walk.png +0 -0
  18. package/src/components/Header.tsx +7 -14
  19. package/src/components/HediaRecommendationModal.tsx +231 -0
  20. package/src/components/InfoBars.tsx +3 -3
  21. package/src/components/InvisibleNumberInput.tsx +7 -7
  22. package/src/components/RecentInsulin.tsx +6 -5
  23. package/src/components/RecommendedCarbs.tsx +24 -24
  24. package/src/components/RecommendedInsulin.tsx +18 -15
  25. package/src/components/Remeasure.tsx +15 -13
  26. package/src/components/TransferToLogbook.tsx +6 -4
  27. package/src/components/activity/Activity.tsx +74 -0
  28. package/src/components/activity/ActivityIcon.tsx +52 -0
  29. package/src/components/activity/ActivityIntensity.tsx +66 -0
  30. package/src/components/mood/Emotion.tsx +64 -0
  31. package/src/components/{MoodIcon.tsx → mood/MoodIcon.tsx} +17 -17
  32. package/src/locale/da/messages.js +1 -1
  33. package/src/locale/da/messages.po +191 -49
  34. package/src/locale/en/messages.js +1 -1
  35. package/src/locale/en/messages.po +193 -51
  36. package/src/types/enum.ts +48 -3
  37. package/src/types/types.ts +21 -1
  38. package/src/utils/AttentionMessages.ts +59 -0
  39. package/src/utils/Constants.ts +20 -1
  40. package/src/utils/RecommendationError.ts +114 -28
  41. package/src/utils/RecommendationUtils.ts +128 -0
  42. package/src/utils/Utils.ts +13 -5
  43. package/src/utils/Validations.ts +210 -0
  44. package/App.jsx +0 -70
  45. package/index.d.ts +0 -5
  46. package/index.js +0 -16
  47. package/src/RecommendationScreen.d.ts +0 -43
  48. package/src/RecommendationScreen.jsx +0 -158
  49. package/src/components/Emotion.d.ts +0 -14
  50. package/src/components/Emotion.jsx +0 -54
  51. package/src/components/Emotion.tsx +0 -70
  52. package/src/components/Header.d.ts +0 -52
  53. package/src/components/Header.jsx +0 -82
  54. package/src/components/InfoBars.d.ts +0 -67
  55. package/src/components/InfoBars.jsx +0 -90
  56. package/src/components/InvisibleNumberInput.d.ts +0 -24
  57. package/src/components/InvisibleNumberInput.jsx +0 -64
  58. package/src/components/MoodIcon.d.ts +0 -14
  59. package/src/components/MoodIcon.jsx +0 -53
  60. package/src/components/RecentInsulin.d.ts +0 -9
  61. package/src/components/RecentInsulin.jsx +0 -90
  62. package/src/components/RecommendedCarbs.d.ts +0 -30
  63. package/src/components/RecommendedCarbs.jsx +0 -193
  64. package/src/components/RecommendedInsulin.d.ts +0 -22
  65. package/src/components/RecommendedInsulin.jsx +0 -109
  66. package/src/components/Remeasure.d.ts +0 -13
  67. package/src/components/Remeasure.jsx +0 -88
  68. package/src/components/TransferToLogbook.d.ts +0 -14
  69. package/src/components/TransferToLogbook.jsx +0 -80
  70. package/src/locale/i18nUtils.d.ts +0 -5
  71. package/src/locale/i18nUtils.js +0 -22
  72. package/src/types/enum.d.ts +0 -34
  73. package/src/types/enum.js +0 -43
  74. package/src/types/types.d.ts +0 -21
  75. package/src/types/types.js +0 -2
  76. package/src/utils/Constants.d.ts +0 -3
  77. package/src/utils/Constants.js +0 -6
  78. package/src/utils/RecommendationError.d.ts +0 -11
  79. package/src/utils/RecommendationError.js +0 -18
  80. package/src/utils/Utils.d.ts +0 -5
  81. package/src/utils/Utils.js +0 -24
  82. /package/src/assets/{happy.png → mood/happy.png} +0 -0
  83. /package/src/assets/{happy_active.png → mood/happy_active.png} +0 -0
  84. /package/src/assets/{neutral.png → mood/neutral.png} +0 -0
  85. /package/src/assets/{neutral_active.png → mood/neutral_active.png} +0 -0
  86. /package/src/assets/{sad.png → mood/sad.png} +0 -0
  87. /package/src/assets/{sad_active.png → mood/sad_active.png} +0 -0
  88. /package/src/assets/{semi_happy.png → mood/semi_happy.png} +0 -0
  89. /package/src/assets/{semi_happy_active.png → mood/semi_happy_active.png} +0 -0
  90. /package/src/assets/{semi_sad.png → mood/semi_sad.png} +0 -0
  91. /package/src/assets/{semi_sad_active.png → mood/semi_sad_active.png} +0 -0
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:HediaRecommendationScreen.xcodeproj">
6
+ </FileRef>
7
+ <FileRef
8
+ location = "group:Pods/Pods.xcodeproj">
9
+ </FileRef>
10
+ </Workspace>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
package/ios/Podfile CHANGED
@@ -1,104 +1,106 @@
1
- platform :ios, '9.0'
2
- require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3
-
4
- def add_flipper_pods!(versions = {})
5
- versions['Flipper'] ||= '~> 0.33.1'
6
- versions['DoubleConversion'] ||= '1.1.7'
7
- versions['Flipper-Folly'] ||= '~> 2.1'
8
- versions['Flipper-Glog'] ||= '0.3.6'
9
- versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
10
- versions['Flipper-RSocket'] ||= '~> 1.0'
11
-
12
- pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
13
- pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
14
- pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
15
- pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
16
- pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
17
-
18
- # List all transitive dependencies for FlipperKit pods
19
- # to avoid them being linked in Release builds
20
- pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
21
- pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
22
- pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
23
- pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
24
- pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
25
- pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
26
- pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
27
- pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
28
- pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
29
- pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
30
- pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
31
- pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
32
- pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
33
- pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
34
- end
35
-
36
- # Post Install processing for Flipper
37
- def flipper_post_install(installer)
38
- installer.pods_project.targets.each do |target|
39
- if target.name == 'YogaKit'
40
- target.build_configurations.each do |config|
41
- config.build_settings['SWIFT_VERSION'] = '4.1'
42
- end
43
- end
44
- end
45
- end
46
-
47
- target 'HediaRecommendationScreen' do
48
- # Pods for HediaRecommendationScreen
49
- pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
50
- pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
51
- pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
52
- pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
53
- pod 'React', :path => '../node_modules/react-native/'
54
- pod 'React-Core', :path => '../node_modules/react-native/'
55
- pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
56
- pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
57
- pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
58
- pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
59
- pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
60
- pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
61
- pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
62
- pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
63
- pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
64
- pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
65
- pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
66
- pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
67
-
68
- pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
69
- pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
70
- pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
71
- pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
72
- pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
73
- pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
74
- pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
75
-
76
- pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
77
- pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
78
- pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
79
-
80
- target 'HediaRecommendationScreenTests' do
81
- inherit! :complete
82
- # Pods for testing
83
- end
84
-
85
- use_native_modules!
86
-
87
- # Enables Flipper.
88
- #
89
- # Note that if you have use_frameworks! enabled, Flipper will not work and
90
- # you should disable these next few lines.
91
- add_flipper_pods!
92
- post_install do |installer|
93
- flipper_post_install(installer)
94
- end
95
- end
96
-
97
- target 'HediaRecommendationScreen-tvOS' do
98
- # Pods for HediaRecommendationScreen-tvOS
99
-
100
- target 'HediaRecommendationScreen-tvOSTests' do
101
- inherit! :search_paths
102
- # Pods for testing
103
- end
104
- end
1
+ platform :ios, '9.0'
2
+ require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3
+
4
+ def add_flipper_pods!(versions = {})
5
+ versions['Flipper'] ||= '~> 0.33.1'
6
+ versions['DoubleConversion'] ||= '1.1.7'
7
+ versions['Flipper-Folly'] ||= '~> 2.1'
8
+ versions['Flipper-Glog'] ||= '0.3.6'
9
+ versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
10
+ versions['Flipper-RSocket'] ||= '~> 1.0'
11
+
12
+ pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
13
+ pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
14
+ pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
15
+ pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
16
+ pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
17
+
18
+ # List all transitive dependencies for FlipperKit pods
19
+ # to avoid them being linked in Release builds
20
+ pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
21
+ pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
22
+ pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
23
+ pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
24
+ pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
25
+ pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
26
+ pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
27
+ pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
28
+ pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
29
+ pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
30
+ pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
31
+ pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
32
+ pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
33
+ pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
34
+ end
35
+
36
+ # Post Install processing for Flipper
37
+ def flipper_post_install(installer)
38
+ installer.pods_project.targets.each do |target|
39
+ if target.name == 'YogaKit'
40
+ target.build_configurations.each do |config|
41
+ config.build_settings['SWIFT_VERSION'] = '4.1'
42
+ end
43
+ end
44
+ end
45
+ end
46
+
47
+ target 'HediaRecommendationScreen' do
48
+ # Pods for HediaRecommendationScreen
49
+ pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
50
+ pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
51
+ pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
52
+ pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
53
+ pod 'React', :path => '../node_modules/react-native/'
54
+ pod 'React-Core', :path => '../node_modules/react-native/'
55
+ pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
56
+ pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
57
+ pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
58
+ pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
59
+ pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
60
+ pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
61
+ pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
62
+ pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
63
+ pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
64
+ pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
65
+ pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
66
+ pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
67
+
68
+ pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
69
+ pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
70
+ pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
71
+ pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
72
+ pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
73
+ pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
74
+ pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
75
+
76
+ pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
77
+ pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
78
+ pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
79
+
80
+ pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
81
+
82
+ target 'HediaRecommendationScreenTests' do
83
+ inherit! :complete
84
+ # Pods for testing
85
+ end
86
+
87
+ use_native_modules!
88
+
89
+ # Enables Flipper.
90
+ #
91
+ # Note that if you have use_frameworks! enabled, Flipper will not work and
92
+ # you should disable these next few lines.
93
+ add_flipper_pods!
94
+ post_install do |installer|
95
+ flipper_post_install(installer)
96
+ end
97
+ end
98
+
99
+ target 'HediaRecommendationScreen-tvOS' do
100
+ # Pods for HediaRecommendationScreen-tvOS
101
+
102
+ target 'HediaRecommendationScreen-tvOSTests' do
103
+ inherit! :search_paths
104
+ # Pods for testing
105
+ end
106
+ end