@plusscommunities/pluss-core-app 6.1.7 → 6.1.8-auth.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 (320) hide show
  1. package/dist/module/actions/FollowerActions.js +4 -4
  2. package/dist/module/actions/FollowerActions.js.map +1 -1
  3. package/dist/module/actions/MediaActions.js +1 -1
  4. package/dist/module/actions/MediaActions.js.map +1 -1
  5. package/dist/module/actions/ResidentActions.js +1 -1
  6. package/dist/module/actions/ResidentActions.js.map +1 -1
  7. package/dist/module/actions/UserActions.js +1 -1
  8. package/dist/module/actions/UserActions.js.map +1 -1
  9. package/dist/module/actions/UserSettingsActions.js +1 -1
  10. package/dist/module/actions/UserSettingsActions.js.map +1 -1
  11. package/dist/module/actions/index.js +5 -5
  12. package/dist/module/actions/index.js.map +1 -1
  13. package/dist/module/actions/types.js +16 -16
  14. package/dist/module/actions/types.js.map +1 -1
  15. package/dist/module/apis/analyticsActions.js +5 -5
  16. package/dist/module/apis/analyticsActions.js.map +1 -1
  17. package/dist/module/apis/contactActions.js +6 -6
  18. package/dist/module/apis/contactActions.js.map +1 -1
  19. package/dist/module/apis/eventActions.js +28 -28
  20. package/dist/module/apis/eventActions.js.map +1 -1
  21. package/dist/module/apis/fileActions.js +21 -28
  22. package/dist/module/apis/fileActions.js.map +1 -1
  23. package/dist/module/apis/followerActions.js +8 -8
  24. package/dist/module/apis/followerActions.js.map +1 -1
  25. package/dist/module/apis/index.js +12 -12
  26. package/dist/module/apis/index.js.map +1 -1
  27. package/dist/module/apis/notificationActions.js +17 -17
  28. package/dist/module/apis/notificationActions.js.map +1 -1
  29. package/dist/module/apis/profileActions.js +4 -4
  30. package/dist/module/apis/profileActions.js.map +1 -1
  31. package/dist/module/apis/reactionActions.js +15 -15
  32. package/dist/module/apis/reactionActions.js.map +1 -1
  33. package/dist/module/apis/settingActions.js +6 -6
  34. package/dist/module/apis/settingActions.js.map +1 -1
  35. package/dist/module/apis/stringActions.js +8 -8
  36. package/dist/module/apis/stringActions.js.map +1 -1
  37. package/dist/module/apis/typeActions.js +4 -4
  38. package/dist/module/apis/typeActions.js.map +1 -1
  39. package/dist/module/apis/userActions.js +8 -8
  40. package/dist/module/apis/userActions.js.map +1 -1
  41. package/dist/module/assets/icons/fontawesome/fa-brands-400.ttf +0 -0
  42. package/dist/module/assets/icons/fontawesome/fa-light-300.ttf +0 -0
  43. package/dist/module/assets/icons/fontawesome/fa-regular-400.ttf +0 -0
  44. package/dist/module/assets/icons/fontawesome/fa-solid-900.ttf +0 -0
  45. package/dist/module/assets/icons/fontawesome/fa-thin-100.ttf +0 -0
  46. package/dist/module/assets/icons/fontawesome/fa7-glyphmap.json +4205 -0
  47. package/dist/module/colours.js +26 -29
  48. package/dist/module/colours.js.map +1 -1
  49. package/dist/module/components/AddButton.js +8 -8
  50. package/dist/module/components/AddButton.js.map +1 -1
  51. package/dist/module/components/AddToCalendarButton.js +30 -29
  52. package/dist/module/components/AddToCalendarButton.js.map +1 -1
  53. package/dist/module/components/Attachment.js +10 -9
  54. package/dist/module/components/Attachment.js.map +1 -1
  55. package/dist/module/components/AudienceSelectorLauncher.js +11 -11
  56. package/dist/module/components/AudienceSelectorLauncher.js.map +1 -1
  57. package/dist/module/components/AudienceSelectorPage.js +45 -44
  58. package/dist/module/components/AudienceSelectorPage.js.map +1 -1
  59. package/dist/module/components/AutoOffsetImage.js +13 -13
  60. package/dist/module/components/AutoOffsetImage.js.map +1 -1
  61. package/dist/module/components/BackButton.js +10 -10
  62. package/dist/module/components/BackButton.js.map +1 -1
  63. package/dist/module/components/CalendarPopup.js +21 -21
  64. package/dist/module/components/CalendarPopup.js.map +1 -1
  65. package/dist/module/components/CategoryTabs.js +30 -29
  66. package/dist/module/components/CategoryTabs.js.map +1 -1
  67. package/dist/module/components/CommentReply.js +36 -34
  68. package/dist/module/components/CommentReply.js.map +1 -1
  69. package/dist/module/components/CommentSection.js +74 -74
  70. package/dist/module/components/CommentSection.js.map +1 -1
  71. package/dist/module/components/ConfirmPopup.js +21 -20
  72. package/dist/module/components/ConfirmPopup.js.map +1 -1
  73. package/dist/module/components/ConfirmationPopup.js +11 -11
  74. package/dist/module/components/ConfirmationPopup.js.map +1 -1
  75. package/dist/module/components/DocumentUploader.js +253 -0
  76. package/dist/module/components/DocumentUploader.js.map +1 -0
  77. package/dist/module/components/DropDownItem.js +14 -13
  78. package/dist/module/components/DropDownItem.js.map +1 -1
  79. package/dist/module/components/DropDownMenu.js +5 -5
  80. package/dist/module/components/DropDownMenu.js.map +1 -1
  81. package/dist/module/components/EmptyStateMain.js +10 -9
  82. package/dist/module/components/EmptyStateMain.js.map +1 -1
  83. package/dist/module/components/EmptyStateWidget.js +7 -6
  84. package/dist/module/components/EmptyStateWidget.js.map +1 -1
  85. package/dist/module/components/FontScaleButton.js +5 -4
  86. package/dist/module/components/FontScaleButton.js.map +1 -1
  87. package/dist/module/components/FontScalePopup.js +11 -10
  88. package/dist/module/components/FontScalePopup.js.map +1 -1
  89. package/dist/module/components/Forbidden.js +13 -13
  90. package/dist/module/components/Forbidden.js.map +1 -1
  91. package/dist/module/components/FormCard.js +4 -4
  92. package/dist/module/components/FormCard.js.map +1 -1
  93. package/dist/module/components/FormCardSection.js +20 -18
  94. package/dist/module/components/FormCardSection.js.map +1 -1
  95. package/dist/module/components/FormCardSectionOptionLauncher.js +13 -12
  96. package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -1
  97. package/dist/module/components/FormattedText.js +18 -16
  98. package/dist/module/components/FormattedText.js.map +1 -1
  99. package/dist/module/components/GenericInput.js +24 -21
  100. package/dist/module/components/GenericInput.js.map +1 -1
  101. package/dist/module/components/GenericInputSection.js +27 -26
  102. package/dist/module/components/GenericInputSection.js.map +1 -1
  103. package/dist/module/components/Header.js +70 -69
  104. package/dist/module/components/Header.js.map +1 -1
  105. package/dist/module/components/Icon.js +109 -0
  106. package/dist/module/components/Icon.js.map +1 -0
  107. package/dist/module/components/ImagePopup.js +237 -77
  108. package/dist/module/components/ImagePopup.js.map +1 -1
  109. package/dist/module/components/ImageUploadProgress.js +10 -9
  110. package/dist/module/components/ImageUploadProgress.js.map +1 -1
  111. package/dist/module/components/ImageUploader.js +22 -13
  112. package/dist/module/components/ImageUploader.js.map +1 -1
  113. package/dist/module/components/InlineButton.js +9 -8
  114. package/dist/module/components/InlineButton.js.map +1 -1
  115. package/dist/module/components/Input.js +28 -26
  116. package/dist/module/components/Input.js.map +1 -1
  117. package/dist/module/components/LoadingCircles.js +20 -20
  118. package/dist/module/components/LoadingCircles.js.map +1 -1
  119. package/dist/module/components/LoadingIndicator.js +11 -11
  120. package/dist/module/components/LoadingIndicator.js.map +1 -1
  121. package/dist/module/components/LoadingStateWidget.js +5 -5
  122. package/dist/module/components/LoadingStateWidget.js.map +1 -1
  123. package/dist/module/components/MediaPlayer.js +32 -32
  124. package/dist/module/components/MediaPlayer.js.map +1 -1
  125. package/dist/module/components/MiddlePopup.js +9 -9
  126. package/dist/module/components/MiddlePopup.js.map +1 -1
  127. package/dist/module/components/PDFPopup.js +36 -36
  128. package/dist/module/components/PDFPopup.js.map +1 -1
  129. package/dist/module/components/PlussChat.js +234 -146
  130. package/dist/module/components/PlussChat.js.map +1 -1
  131. package/dist/module/components/PlussChatMessage.js +75 -38
  132. package/dist/module/components/PlussChatMessage.js.map +1 -1
  133. package/dist/module/components/PlussChatTime.js +18 -17
  134. package/dist/module/components/PlussChatTime.js.map +1 -1
  135. package/dist/module/components/Popup.js +20 -19
  136. package/dist/module/components/Popup.js.map +1 -1
  137. package/dist/module/components/PopupMenu.js +15 -14
  138. package/dist/module/components/PopupMenu.js.map +1 -1
  139. package/dist/module/components/PositionedImage.js +20 -20
  140. package/dist/module/components/PositionedImage.js.map +1 -1
  141. package/dist/module/components/ProfilePic.js +10 -10
  142. package/dist/module/components/ProfilePic.js.map +1 -1
  143. package/dist/module/components/RadioButton.js +10 -9
  144. package/dist/module/components/RadioButton.js.map +1 -1
  145. package/dist/module/components/Reaction.js +18 -17
  146. package/dist/module/components/Reaction.js.map +1 -1
  147. package/dist/module/components/Reactions.js +7 -7
  148. package/dist/module/components/Reactions.js.map +1 -1
  149. package/dist/module/components/SharingTools.js +29 -28
  150. package/dist/module/components/SharingTools.js.map +1 -1
  151. package/dist/module/components/Spinner.js +5 -5
  152. package/dist/module/components/Spinner.js.map +1 -1
  153. package/dist/module/components/StickyFooter.js +6 -6
  154. package/dist/module/components/StickyFooter.js.map +1 -1
  155. package/dist/module/components/Text.js +57 -0
  156. package/dist/module/components/Text.js.map +1 -0
  157. package/dist/module/components/TickIcon.js +6 -6
  158. package/dist/module/components/TickIcon.js.map +1 -1
  159. package/dist/module/components/Toggle.js +10 -9
  160. package/dist/module/components/Toggle.js.map +1 -1
  161. package/dist/module/components/TouchableSearchBar.js +18 -17
  162. package/dist/module/components/TouchableSearchBar.js.map +1 -1
  163. package/dist/module/components/UserListPopup.js +20 -19
  164. package/dist/module/components/UserListPopup.js.map +1 -1
  165. package/dist/module/components/UserListing.js +41 -40
  166. package/dist/module/components/UserListing.js.map +1 -1
  167. package/dist/module/components/VideoPopup.js +20 -20
  168. package/dist/module/components/VideoPopup.js.map +1 -1
  169. package/dist/module/components/WarningPopup.js +21 -20
  170. package/dist/module/components/WarningPopup.js.map +1 -1
  171. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +13 -13
  172. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -1
  173. package/dist/module/components/expo-image-picker-multiple/ImageTile.js +24 -23
  174. package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -1
  175. package/dist/module/components/index.js +59 -57
  176. package/dist/module/components/index.js.map +1 -1
  177. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +90 -58
  178. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -1
  179. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +64 -64
  180. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -1
  181. package/dist/module/config.js +6 -1
  182. package/dist/module/config.js.map +1 -1
  183. package/dist/module/constants.js +3 -3
  184. package/dist/module/constants.js.map +1 -1
  185. package/dist/module/helper.js +83 -82
  186. package/dist/module/helper.js.map +1 -1
  187. package/dist/module/index.js +12 -12
  188. package/dist/module/index.js.map +1 -1
  189. package/dist/module/js/images/detectFaces.js +6 -6
  190. package/dist/module/js/images/detectFaces.js.map +1 -1
  191. package/dist/module/js/images/findLandmarkRange.js +8 -8
  192. package/dist/module/js/images/findLandmarkRange.js.map +1 -1
  193. package/dist/module/js/images/getScaledOffset.js.map +1 -1
  194. package/dist/module/js/site/getSiteLevelFromState.js +2 -2
  195. package/dist/module/js/site/getSiteLevelFromState.js.map +1 -1
  196. package/dist/module/js/site/isTVEnabled.js +2 -2
  197. package/dist/module/js/site/isTVEnabled.js.map +1 -1
  198. package/dist/module/session.js +2 -2
  199. package/dist/module/session.js.map +1 -1
  200. package/dist/module/styles.js +17 -17
  201. package/dist/module/styles.js.map +1 -1
  202. package/dist/module/withNavigationFocus.js +30 -0
  203. package/dist/module/withNavigationFocus.js.map +1 -0
  204. package/package.json +4 -1
  205. package/src/actions/FollowerActions.js +36 -32
  206. package/src/actions/MediaActions.js +25 -20
  207. package/src/actions/ResidentActions.js +26 -21
  208. package/src/actions/UserActions.js +22 -22
  209. package/src/actions/UserSettingsActions.js +11 -11
  210. package/src/actions/index.js +5 -5
  211. package/src/actions/types.js +16 -16
  212. package/src/apis/analyticsActions.js +17 -17
  213. package/src/apis/contactActions.js +20 -20
  214. package/src/apis/eventActions.js +153 -144
  215. package/src/apis/fileActions.js +19 -27
  216. package/src/apis/followerActions.js +29 -29
  217. package/src/apis/index.js +12 -12
  218. package/src/apis/notificationActions.js +44 -44
  219. package/src/apis/profileActions.js +8 -8
  220. package/src/apis/reactionActions.js +81 -73
  221. package/src/apis/settingActions.js +15 -15
  222. package/src/apis/stringActions.js +29 -25
  223. package/src/apis/typeActions.js +10 -10
  224. package/src/apis/userActions.js +93 -93
  225. package/src/assets/icons/fontawesome/fa-brands-400.ttf +0 -0
  226. package/src/assets/icons/fontawesome/fa-light-300.ttf +0 -0
  227. package/src/assets/icons/fontawesome/fa-regular-400.ttf +0 -0
  228. package/src/assets/icons/fontawesome/fa-solid-900.ttf +0 -0
  229. package/src/assets/icons/fontawesome/fa-thin-100.ttf +0 -0
  230. package/src/assets/icons/fontawesome/fa7-glyphmap.json +4205 -0
  231. package/src/colours.js +116 -96
  232. package/src/components/AddButton.js +32 -27
  233. package/src/components/AddToCalendarButton.js +236 -202
  234. package/src/components/Attachment.js +59 -36
  235. package/src/components/AudienceSelectorLauncher.js +52 -48
  236. package/src/components/AudienceSelectorPage.js +353 -311
  237. package/src/components/AutoOffsetImage.js +237 -196
  238. package/src/components/BackButton.js +57 -41
  239. package/src/components/CalendarPopup.js +127 -97
  240. package/src/components/CategoryTabs.js +208 -163
  241. package/src/components/CommentReply.js +363 -309
  242. package/src/components/CommentSection.js +974 -782
  243. package/src/components/ConfirmPopup.js +141 -110
  244. package/src/components/ConfirmationPopup.js +80 -69
  245. package/src/components/DocumentUploader.js +255 -0
  246. package/src/components/DropDownItem.js +70 -60
  247. package/src/components/DropDownMenu.js +31 -27
  248. package/src/components/EmptyStateMain.js +51 -44
  249. package/src/components/EmptyStateWidget.js +47 -38
  250. package/src/components/FontScaleButton.js +29 -25
  251. package/src/components/FontScalePopup.js +67 -56
  252. package/src/components/Forbidden.js +48 -46
  253. package/src/components/FormCard.js +21 -17
  254. package/src/components/FormCardSection.js +284 -233
  255. package/src/components/FormCardSectionOptionLauncher.js +72 -46
  256. package/src/components/FormattedText.js +128 -111
  257. package/src/components/GenericInput.js +168 -136
  258. package/src/components/GenericInputSection.js +209 -161
  259. package/src/components/Header.js +620 -474
  260. package/src/components/Icon.js +119 -0
  261. package/src/components/ImagePopup.js +425 -206
  262. package/src/components/ImageUploadProgress.js +49 -41
  263. package/src/components/ImageUploader.js +23 -13
  264. package/src/components/InlineButton.js +79 -69
  265. package/src/components/Input.js +190 -156
  266. package/src/components/LoadingCircles.js +233 -233
  267. package/src/components/LoadingIndicator.js +87 -76
  268. package/src/components/LoadingStateWidget.js +47 -37
  269. package/src/components/MediaPlayer.js +416 -387
  270. package/src/components/MiddlePopup.js +50 -32
  271. package/src/components/PDFPopup.js +198 -159
  272. package/src/components/PlussChat.js +1271 -986
  273. package/src/components/PlussChatMessage.js +330 -262
  274. package/src/components/PlussChatTime.js +57 -53
  275. package/src/components/Popup.js +138 -116
  276. package/src/components/PopupMenu.js +140 -110
  277. package/src/components/PositionedImage.js +281 -237
  278. package/src/components/ProfilePic.js +122 -113
  279. package/src/components/RadioButton.js +76 -52
  280. package/src/components/Reaction.js +134 -96
  281. package/src/components/Reactions.js +65 -63
  282. package/src/components/SharingTools.js +136 -122
  283. package/src/components/Spinner.js +13 -13
  284. package/src/components/StickyFooter.js +36 -26
  285. package/src/components/Text.js +62 -0
  286. package/src/components/TickIcon.js +20 -20
  287. package/src/components/Toggle.js +74 -73
  288. package/src/components/TouchableSearchBar.js +68 -50
  289. package/src/components/UserListPopup.js +161 -124
  290. package/src/components/UserListing.js +273 -238
  291. package/src/components/VideoPopup.js +110 -96
  292. package/src/components/WarningPopup.js +92 -71
  293. package/src/components/expo-image-picker-multiple/ImageBrowser.js +288 -256
  294. package/src/components/expo-image-picker-multiple/ImageTile.js +108 -84
  295. package/src/components/index.js +59 -57
  296. package/src/components/react-native-expo-image-cropper/ExpoImageManipulator.js +442 -358
  297. package/src/components/react-native-expo-image-cropper/ImageCropOverlay.js +420 -324
  298. package/src/config.js +5 -0
  299. package/src/constants.js +8 -8
  300. package/src/helper.js +469 -438
  301. package/src/index.js +24 -12
  302. package/src/js/images/detectFaces.js +27 -20
  303. package/src/js/images/findLandmarkRange.js +97 -90
  304. package/src/js/images/getScaledOffset.js +80 -75
  305. package/src/js/site/getSiteLevelFromState.js +26 -26
  306. package/src/js/site/isTVEnabled.js +10 -10
  307. package/src/session.js +2 -2
  308. package/src/styles.js +61 -61
  309. package/src/withNavigationFocus.js +28 -0
  310. package/dist/module/components/TextStyle.js +0 -45
  311. package/dist/module/components/TextStyle.js.map +0 -1
  312. package/dist/module/fonts/index.js +0 -2
  313. package/dist/module/fonts/index.js.map +0 -1
  314. package/dist/module/fonts/pluss60-icons.js +0 -5
  315. package/dist/module/fonts/pluss60-icons.js.map +0 -1
  316. package/dist/module/fonts/pluss60-icons.json +0 -1097
  317. package/src/components/TextStyle.js +0 -48
  318. package/src/fonts/index.js +0 -1
  319. package/src/fonts/pluss60-icons.js +0 -6
  320. package/src/fonts/pluss60-icons.json +0 -1097
@@ -1,8 +1,17 @@
1
- import React, { Component } from 'react';
2
- import { Animated, View, StatusBar, Image, Dimensions, TouchableOpacity, Text, Platform } from 'react-native';
3
- import { Icon } from 'react-native-elements';
4
- import { LinearGradient } from 'expo-linear-gradient';
5
- import { connect } from 'react-redux';
1
+ import React, { Component } from "react";
2
+ import { Text } from "@plusscommunities/pluss-core-app/components";
3
+ import {
4
+ Animated,
5
+ View,
6
+ StatusBar,
7
+ Image,
8
+ Dimensions,
9
+ TouchableOpacity,
10
+ Platform,
11
+ } from "react-native";
12
+ import { Icon } from "@rneui/themed";
13
+ import { LinearGradient } from "expo-linear-gradient";
14
+ import { connect } from "react-redux";
6
15
  // import {
7
16
  // StatusBarHeight,
8
17
  // COLOUR_TRANSPARENT,
@@ -14,493 +23,630 @@ import { connect } from 'react-redux';
14
23
  // hexToRGBAstring,
15
24
  // getSiteSettingFromState,
16
25
  // } from '../../js';
17
- import { StatusBarHeight, getSiteSettingFromState } from '../helper';
26
+ import { StatusBarHeight, getSiteSettingFromState } from "../helper";
18
27
  import {
19
- COLOUR_TRANSPARENT,
20
- TEXT_DARK,
21
- TEXT_LIGHT,
22
- LINEGREY,
23
- COLOUR_GREEN,
24
- getMainBrandingColourFromState,
25
- hexToRGBAstring,
26
- } from '../colours';
27
- import { Pl60Icon } from '../fonts';
28
- import Config from '../config';
28
+ COLOUR_TRANSPARENT,
29
+ TEXT_DARK,
30
+ TEXT_LIGHT,
31
+ LINEGREY,
32
+ COLOUR_GREEN,
33
+ getMainBrandingColourFromState,
34
+ hexToRGBAstring,
35
+ } from "../colours";
36
+ import { FontAwesome } from "./Icon";
37
+ import Config from "../config";
29
38
  // import { HAS_GRADIENT_HEADER } from '../../config';
30
39
 
31
40
  class Header extends Component {
32
- constructor(props) {
33
- super(props);
41
+ constructor(props) {
42
+ super(props);
34
43
 
35
- this.state = {};
36
- }
44
+ this.state = {};
45
+ }
37
46
 
38
- UNSAFE_componentWillMount() {
39
- let barStyle = Platform.select({ ios: 'dark-content', android: 'default' });
40
- if (this.props.barStyle) {
41
- barStyle = this.props.barStyle;
42
- } else if (this.props.headerType !== 'white' && !this.props.noGradient && !this.props.transparent) {
43
- barStyle = 'light-content';
44
- }
45
- this.setState({ windowWidth: Dimensions.get('window').width, barStyle });
46
- }
47
+ UNSAFE_componentWillMount() {
48
+ let barStyle = Platform.select({ ios: "dark-content", android: "default" });
49
+ if (this.props.barStyle) {
50
+ barStyle = this.props.barStyle;
51
+ } else if (
52
+ this.props.headerType !== "white" &&
53
+ !this.props.noGradient &&
54
+ !this.props.transparent
55
+ ) {
56
+ barStyle = "light-content";
57
+ }
58
+ this.setState({ windowWidth: Dimensions.get("window").width, barStyle });
59
+ }
47
60
 
48
- getTextColourStyle() {
49
- if (this.props.textColour) {
50
- return { color: this.props.textColour };
51
- }
52
- if (this.props.headerType !== 'white' && !this.props.noGradient && !this.props.transparent) {
53
- return { color: '#fff' };
54
- }
55
- return null;
56
- }
61
+ getTextColourStyle() {
62
+ if (this.props.textColour) {
63
+ return { color: this.props.textColour };
64
+ }
65
+ if (
66
+ this.props.headerType !== "white" &&
67
+ !this.props.noGradient &&
68
+ !this.props.transparent
69
+ ) {
70
+ return { color: "#fff" };
71
+ }
72
+ return null;
73
+ }
57
74
 
58
- renderBackground() {
59
- if (this.props.headerBackground) return this.props.headerBackground;
60
- if (this.props.headerImage) {
61
- return <Image style={[styles.thumbnailStyle, { width: this.state.windowWidth }]} source={{ uri: this.props.headerImage }} />;
62
- }
63
- if (this.props.headerType === 'pattern' && !this.props.noGradient && !this.props.transparent) {
64
- return (
65
- <View
66
- style={[
67
- styles.thumbnailStyle,
68
- this.props.contentContainerStyle,
69
- { backgroundColor: this.props.colourBrandingMain, width: this.state.windowWidth },
70
- this.props.popupHeader && styles.thumbnailPopupHeader,
71
- ]}
72
- >
73
- <Image
74
- style={[styles.headerPattern, this.props.patternColour && { tintColor: this.props.patternColour }]}
75
- source={{ uri: this.props.headerPattern }}
76
- />
77
- </View>
78
- );
79
- }
80
- if (this.props.headerType === 'block' && !this.props.noGradient && !this.props.transparent) {
81
- return (
82
- <View
83
- style={[
84
- styles.thumbnailStyle,
85
- this.props.contentContainerStyle,
86
- { backgroundColor: this.props.colourBrandingMain, width: this.state.windowWidth },
87
- this.props.popupHeader && styles.thumbnailPopupHeader,
88
- ]}
89
- />
90
- );
91
- }
92
- if (this.props.headerType === 'gradient' && !this.props.noGradient && !this.props.transparent) {
93
- return (
94
- <View
95
- style={[
96
- styles.thumbnailStyle,
97
- this.props.contentContainerStyle,
98
- { width: this.state.windowWidth },
99
- this.props.popupHeader && styles.thumbnailPopupHeader,
100
- ]}
101
- >
102
- <LinearGradient
103
- style={{ flex: 1 }}
104
- colors={[this.props.colourBrandingMain, hexToRGBAstring(this.props.colourBrandingMain, 0.7)]}
105
- start={{ x: 0, y: 0 }}
106
- end={{ x: 1, y: 1 }}
107
- locations={[0.4, 1]}
108
- />
109
- </View>
110
- );
111
- }
112
- return null;
113
- }
75
+ renderBackground() {
76
+ if (this.props.headerBackground) return this.props.headerBackground;
77
+ if (this.props.headerImage) {
78
+ return (
79
+ <Image
80
+ style={[styles.thumbnailStyle, { width: this.state.windowWidth }]}
81
+ source={{ uri: this.props.headerImage }}
82
+ />
83
+ );
84
+ }
85
+ if (
86
+ this.props.headerType === "pattern" &&
87
+ !this.props.noGradient &&
88
+ !this.props.transparent
89
+ ) {
90
+ return (
91
+ <View
92
+ style={[
93
+ styles.thumbnailStyle,
94
+ this.props.contentContainerStyle,
95
+ {
96
+ backgroundColor: this.props.colourBrandingMain,
97
+ width: this.state.windowWidth,
98
+ },
99
+ this.props.popupHeader && styles.thumbnailPopupHeader,
100
+ ]}
101
+ >
102
+ <Image
103
+ style={[
104
+ styles.headerPattern,
105
+ this.props.patternColour && {
106
+ tintColor: this.props.patternColour,
107
+ },
108
+ ]}
109
+ source={{ uri: this.props.headerPattern }}
110
+ />
111
+ </View>
112
+ );
113
+ }
114
+ if (
115
+ this.props.headerType === "block" &&
116
+ !this.props.noGradient &&
117
+ !this.props.transparent
118
+ ) {
119
+ return (
120
+ <View
121
+ style={[
122
+ styles.thumbnailStyle,
123
+ this.props.contentContainerStyle,
124
+ {
125
+ backgroundColor: this.props.colourBrandingMain,
126
+ width: this.state.windowWidth,
127
+ },
128
+ this.props.popupHeader && styles.thumbnailPopupHeader,
129
+ ]}
130
+ />
131
+ );
132
+ }
133
+ if (
134
+ this.props.headerType === "gradient" &&
135
+ !this.props.noGradient &&
136
+ !this.props.transparent
137
+ ) {
138
+ return (
139
+ <View
140
+ style={[
141
+ styles.thumbnailStyle,
142
+ this.props.contentContainerStyle,
143
+ { width: this.state.windowWidth },
144
+ this.props.popupHeader && styles.thumbnailPopupHeader,
145
+ ]}
146
+ >
147
+ <LinearGradient
148
+ style={{ flex: 1 }}
149
+ colors={[
150
+ this.props.colourBrandingMain,
151
+ hexToRGBAstring(this.props.colourBrandingMain, 0.7),
152
+ ]}
153
+ start={{ x: 0, y: 0 }}
154
+ end={{ x: 1, y: 1 }}
155
+ locations={[0.4, 1]}
156
+ />
157
+ </View>
158
+ );
159
+ }
160
+ return null;
161
+ }
114
162
 
115
- renderLeftBubble() {
116
- if (!this.props.hasLeftBubble) {
117
- return null;
118
- }
119
- return <View style={[styles.counter, styles.smallCounter]} />;
120
- }
163
+ renderLeftBubble() {
164
+ if (!this.props.hasLeftBubble) {
165
+ return null;
166
+ }
167
+ return <View style={[styles.counter, styles.smallCounter]} />;
168
+ }
121
169
 
122
- renderLeftIcon() {
123
- if ((!this.props.leftIcon && !this.props.leftText) || !this.props.onPressLeft) {
124
- return null;
125
- }
126
- if (this.props.leftText) {
127
- return (
128
- <View style={[styles.headerContentIcon, { width: 'auto' }]}>
129
- <TouchableOpacity onPress={this.props.onPressLeft} activeOpacity={0.6}>
130
- <Text
131
- style={[
132
- styles.buttonText,
133
- { paddingRight: 5, paddingLeft: 15, color: this.props.colourBrandingMain },
134
- this.props.leftTextStyle,
135
- this.props.headerType !== 'white' && !this.props.noGradient && !this.props.transparent && { color: '#fff' },
136
- ]}
137
- >
138
- {this.props.leftText}
139
- </Text>
140
- </TouchableOpacity>
141
- </View>
142
- );
143
- }
144
- if (this.props.leftIconType && this.props.leftIconType === 'pluss') {
145
- return (
146
- <View style={styles.headerContentIcon}>
147
- <TouchableOpacity onPress={this.props.onPressLeft} activeOpacity={0.6}>
148
- <View style={styles.headerContentIcon}>
149
- <Pl60Icon name={this.props.leftIcon} style={[styles.leftIcon, this.props.leftIconStyle, this.getTextColourStyle()]} />
150
- {this.renderLeftBubble()}
151
- </View>
152
- </TouchableOpacity>
153
- </View>
154
- );
155
- }
156
- return (
157
- <View style={styles.headerContentIcon}>
158
- <TouchableOpacity onPress={this.props.onPressLeft} activeOpacity={0.6}>
159
- <Icon
160
- name={this.props.leftIcon}
161
- style={styles.headerContentIcon}
162
- type="font-awesome"
163
- iconStyle={[styles.leftIcon, this.props.leftIconStyle, this.getTextColourStyle()]}
164
- />
165
- {this.renderLeftBubble()}
166
- </TouchableOpacity>
167
- </View>
168
- );
169
- }
170
+ renderLeftIcon() {
171
+ if (
172
+ (!this.props.leftIcon && !this.props.leftText) ||
173
+ !this.props.onPressLeft
174
+ ) {
175
+ return null;
176
+ }
177
+ if (this.props.leftText) {
178
+ return (
179
+ <View style={[styles.headerContentIcon, { width: "auto" }]}>
180
+ <TouchableOpacity
181
+ onPress={this.props.onPressLeft}
182
+ activeOpacity={0.6}
183
+ >
184
+ <Text
185
+ style={[
186
+ styles.buttonText,
187
+ {
188
+ paddingRight: 5,
189
+ paddingLeft: 15,
190
+ color: this.props.colourBrandingMain,
191
+ },
192
+ this.props.leftTextStyle,
193
+ this.props.headerType !== "white" &&
194
+ !this.props.noGradient &&
195
+ !this.props.transparent && { color: "#fff" },
196
+ ]}
197
+ >
198
+ {this.props.leftText}
199
+ </Text>
200
+ </TouchableOpacity>
201
+ </View>
202
+ );
203
+ }
204
+ if (this.props.leftIconType && this.props.leftIconType === "pluss") {
205
+ return (
206
+ <View style={styles.headerContentIcon}>
207
+ <TouchableOpacity
208
+ onPress={this.props.onPressLeft}
209
+ activeOpacity={0.6}
210
+ >
211
+ <View style={styles.headerContentIcon}>
212
+ <FontAwesome
213
+ name={this.props.leftIcon}
214
+ style={[
215
+ styles.leftIcon,
216
+ this.props.leftIconStyle,
217
+ this.getTextColourStyle(),
218
+ ]}
219
+ />
220
+ {this.renderLeftBubble()}
221
+ </View>
222
+ </TouchableOpacity>
223
+ </View>
224
+ );
225
+ }
226
+ return (
227
+ <View style={styles.headerContentIcon}>
228
+ <TouchableOpacity onPress={this.props.onPressLeft} activeOpacity={0.6}>
229
+ <Icon
230
+ name={this.props.leftIcon}
231
+ style={styles.headerContentIcon}
232
+ type="font-awesome"
233
+ iconStyle={[
234
+ styles.leftIcon,
235
+ this.props.leftIconStyle,
236
+ this.getTextColourStyle(),
237
+ ]}
238
+ />
239
+ {this.renderLeftBubble()}
240
+ </TouchableOpacity>
241
+ </View>
242
+ );
243
+ }
170
244
 
171
- renderHeaderText() {
172
- if (!this.props.text) {
173
- if (this.props.centerContent) {
174
- return this.props.centerContent;
175
- }
176
- return null;
177
- }
178
- if (this.props.onTextPress) {
179
- return (
180
- <TouchableOpacity
181
- onPress={this.props.onTextPress}
182
- activeOpacity={0.6}
183
- style={[
184
- styles.headerTextContainer,
185
- this.props.leftIcon && ((!this.props.rightIcon && !this.props.rightText) || this.props.absoluteRight) && { paddingRight: 55 },
186
- this.props.textContainerStyle,
187
- ]}
188
- >
189
- <Text style={[styles.headerText, this.props.textStyle, this.getTextColourStyle()]} numberOfLines={1} ellipsizeMode="tail">
190
- {this.props.text}
191
- </Text>
192
- </TouchableOpacity>
193
- );
194
- }
195
- return (
196
- <View
197
- style={[
198
- styles.headerTextContainer,
199
- this.props.leftIcon && ((!this.props.rightIcon && !this.props.rightText) || this.props.absoluteRight) && { paddingRight: 55 },
200
- this.props.rightIcon && ((!this.props.leftIcon && !this.props.leftText) || this.props.absoluteLeft) && { paddingLeft: 55 },
201
- this.props.textContainerStyle,
202
- ]}
203
- >
204
- <Text style={[styles.headerText, this.props.textStyle, this.getTextColourStyle()]} numberOfLines={1} ellipsizeMode="tail">
205
- {this.props.text}
206
- </Text>
207
- </View>
208
- );
209
- }
245
+ renderHeaderText() {
246
+ if (!this.props.text) {
247
+ if (this.props.centerContent) {
248
+ return this.props.centerContent;
249
+ }
250
+ return null;
251
+ }
252
+ if (this.props.onTextPress) {
253
+ return (
254
+ <TouchableOpacity
255
+ onPress={this.props.onTextPress}
256
+ activeOpacity={0.6}
257
+ style={[
258
+ styles.headerTextContainer,
259
+ this.props.leftIcon &&
260
+ ((!this.props.rightIcon && !this.props.rightText) ||
261
+ this.props.absoluteRight) && { paddingRight: 55 },
262
+ this.props.textContainerStyle,
263
+ ]}
264
+ >
265
+ <Text
266
+ style={[
267
+ styles.headerText,
268
+ this.props.textStyle,
269
+ this.getTextColourStyle(),
270
+ ]}
271
+ numberOfLines={1}
272
+ ellipsizeMode="tail"
273
+ >
274
+ {this.props.text}
275
+ </Text>
276
+ </TouchableOpacity>
277
+ );
278
+ }
279
+ return (
280
+ <View
281
+ style={[
282
+ styles.headerTextContainer,
283
+ this.props.leftIcon &&
284
+ ((!this.props.rightIcon && !this.props.rightText) ||
285
+ this.props.absoluteRight) && { paddingRight: 55 },
286
+ this.props.rightIcon &&
287
+ ((!this.props.leftIcon && !this.props.leftText) ||
288
+ this.props.absoluteLeft) && { paddingLeft: 55 },
289
+ this.props.textContainerStyle,
290
+ ]}
291
+ >
292
+ <Text
293
+ style={[
294
+ styles.headerText,
295
+ this.props.textStyle,
296
+ this.getTextColourStyle(),
297
+ ]}
298
+ numberOfLines={1}
299
+ ellipsizeMode="tail"
300
+ >
301
+ {this.props.text}
302
+ </Text>
303
+ </View>
304
+ );
305
+ }
210
306
 
211
- renderRightIcon() {
212
- if (this.props.rightContent) {
213
- return this.props.rightContent;
214
- }
215
- if (!this.props.onPressRight) {
216
- return null;
217
- }
218
- if (this.props.rightText && this.props.onPressRight) {
219
- return (
220
- <View
221
- style={[
222
- styles.headerContentIcon,
223
- { width: 'auto' },
224
- this.props.absoluteRight && styles.absoluteRight,
225
- this.props.rightContainerStyle,
226
- ]}
227
- >
228
- <TouchableOpacity onPress={this.props.onPressRight} activeOpacity={0.6}>
229
- <Text
230
- style={[
231
- styles.buttonText,
232
- { paddingRight: 15, paddingLeft: 5, textAlign: 'right', fontFamily: 'sf-semibold', color: this.props.colourBrandingMain },
233
- this.getTextColourStyle(),
234
- this.props.optionalRightStyle,
235
- ]}
236
- >
237
- {this.props.rightText}
238
- </Text>
239
- </TouchableOpacity>
240
- </View>
241
- );
242
- }
243
- if (!this.props.rightIcon) {
244
- if (this.props.rightImage) {
245
- return (
246
- <TouchableOpacity onPress={this.props.onPressRight} activeOpacity={0.6}>
247
- <View style={styles.headerContentIcon}>
248
- <Image source={{ uri: this.props.rightImage }} style={styles.rightImage} resizeMode="contain" />
249
- </View>
250
- </TouchableOpacity>
251
- );
252
- }
253
- return null;
254
- }
255
- return (
256
- <TouchableOpacity onPress={this.props.onPressRight} activeOpacity={0.6}>
257
- {this.props.rightIconType && this.props.rightIconType === 'pluss' ? (
258
- <View style={styles.headerContentIcon}>
259
- <Pl60Icon name={this.props.rightIcon} style={[styles.rightIcon, this.getTextColourStyle(), this.props.rightIconStyle]} />
260
- </View>
261
- ) : (
262
- <Icon
263
- name={this.props.rightIcon}
264
- style={styles.headerContentIcon}
265
- type={this.props.rightIconType ? this.props.rightIconType : 'font-awesome'}
266
- iconStyle={[styles.rightIcon, this.getTextColourStyle(), this.props.rightIconStyle]}
267
- />
268
- )}
269
- </TouchableOpacity>
270
- );
271
- }
307
+ renderRightIcon() {
308
+ if (this.props.rightContent) {
309
+ return this.props.rightContent;
310
+ }
311
+ if (!this.props.onPressRight) {
312
+ return null;
313
+ }
314
+ if (this.props.rightText && this.props.onPressRight) {
315
+ return (
316
+ <View
317
+ style={[
318
+ styles.headerContentIcon,
319
+ { width: "auto" },
320
+ this.props.absoluteRight && styles.absoluteRight,
321
+ this.props.rightContainerStyle,
322
+ ]}
323
+ >
324
+ <TouchableOpacity
325
+ onPress={this.props.onPressRight}
326
+ activeOpacity={0.6}
327
+ >
328
+ <Text
329
+ style={[
330
+ styles.buttonText,
331
+ {
332
+ paddingRight: 15,
333
+ paddingLeft: 5,
334
+ textAlign: "right",
335
+ fontFamily: "sf-semibold",
336
+ color: this.props.colourBrandingMain,
337
+ },
338
+ this.getTextColourStyle(),
339
+ this.props.optionalRightStyle,
340
+ ]}
341
+ >
342
+ {this.props.rightText}
343
+ </Text>
344
+ </TouchableOpacity>
345
+ </View>
346
+ );
347
+ }
348
+ if (!this.props.rightIcon) {
349
+ if (this.props.rightImage) {
350
+ return (
351
+ <TouchableOpacity
352
+ onPress={this.props.onPressRight}
353
+ activeOpacity={0.6}
354
+ >
355
+ <View style={styles.headerContentIcon}>
356
+ <Image
357
+ source={{ uri: this.props.rightImage }}
358
+ style={styles.rightImage}
359
+ resizeMode="contain"
360
+ />
361
+ </View>
362
+ </TouchableOpacity>
363
+ );
364
+ }
365
+ return null;
366
+ }
367
+ return (
368
+ <TouchableOpacity onPress={this.props.onPressRight} activeOpacity={0.6}>
369
+ {this.props.rightIconType && this.props.rightIconType === "pluss" ? (
370
+ <View style={styles.headerContentIcon}>
371
+ <FontAwesome
372
+ name={this.props.rightIcon}
373
+ style={[
374
+ styles.rightIcon,
375
+ this.getTextColourStyle(),
376
+ this.props.rightIconStyle,
377
+ ]}
378
+ />
379
+ </View>
380
+ ) : (
381
+ <Icon
382
+ name={this.props.rightIcon}
383
+ style={styles.headerContentIcon}
384
+ type={
385
+ this.props.rightIconType
386
+ ? this.props.rightIconType
387
+ : "font-awesome"
388
+ }
389
+ iconStyle={[
390
+ styles.rightIcon,
391
+ this.getTextColourStyle(),
392
+ this.props.rightIconStyle,
393
+ ]}
394
+ />
395
+ )}
396
+ </TouchableOpacity>
397
+ );
398
+ }
272
399
 
273
- render() {
274
- if (this.props.animatedHeader) {
275
- return (
276
- <Animated.View
277
- style={[
278
- styles.container,
279
- !this.props.noShadow && styles.containerShadow,
280
- this.props.transparent && styles.transparentContainer,
281
- this.props.style,
282
- { backgroundColor: this.props.headerColourOffset, elevation: this.props.headerElev, shadowColor: this.props.headerShadow },
283
- ]}
284
- >
285
- {this.renderBackground()}
286
- <StatusBar barStyle={this.state.barStyle} translucent />
287
- <View style={styles.headerContent}>
288
- {this.renderLeftIcon()}
289
- {this.renderHeaderText()}
290
- {this.renderRightIcon()}
291
- {this.props.children}
292
- </View>
293
- {this.props.extraHeaderContent}
294
- </Animated.View>
295
- );
296
- }
297
- return (
298
- <View
299
- style={[
300
- styles.container,
301
- !this.props.noShadow && styles.containerShadow,
302
- this.props.transparent && styles.transparentContainer,
303
- this.props.lineSeparated && styles.lineSeparated,
304
- this.props.popupHeader && styles.popupHeader,
305
- this.props.style,
306
- this.props.colourBrandingHeader && { backgroundColor: this.props.colourBrandingHeader },
307
- ]}
308
- >
309
- <View
310
- style={[
311
- styles.contentContainer,
312
- this.props.popupHeader && styles.popupContentContainer,
313
- this.props.contentContainerStyle,
314
- this.props.colourBrandingHeader && { backgroundColor: this.props.colourBrandingHeader },
315
- ]}
316
- >
317
- {this.renderBackground()}
318
- <StatusBar barStyle={this.state.barStyle} translucent />
319
- <View style={[styles.headerContent, this.props.popupHeader && styles.headerContentPopup]}>
320
- {this.renderLeftIcon()}
321
- {this.renderHeaderText()}
322
- {this.renderRightIcon()}
323
- {this.props.children}
324
- </View>
325
- </View>
326
- {this.props.extraHeaderContent}
327
- </View>
328
- );
329
- }
400
+ render() {
401
+ if (this.props.animatedHeader) {
402
+ return (
403
+ <Animated.View
404
+ style={[
405
+ styles.container,
406
+ !this.props.noShadow && styles.containerShadow,
407
+ this.props.transparent && styles.transparentContainer,
408
+ this.props.style,
409
+ {
410
+ backgroundColor: this.props.headerColourOffset,
411
+ elevation: this.props.headerElev,
412
+ shadowColor: this.props.headerShadow,
413
+ },
414
+ ]}
415
+ >
416
+ {this.renderBackground()}
417
+ <StatusBar barStyle={this.state.barStyle} translucent />
418
+ <View style={styles.headerContent}>
419
+ {this.renderLeftIcon()}
420
+ {this.renderHeaderText()}
421
+ {this.renderRightIcon()}
422
+ {this.props.children}
423
+ </View>
424
+ {this.props.extraHeaderContent}
425
+ </Animated.View>
426
+ );
427
+ }
428
+ return (
429
+ <View
430
+ style={[
431
+ styles.container,
432
+ !this.props.noShadow && styles.containerShadow,
433
+ this.props.transparent && styles.transparentContainer,
434
+ this.props.lineSeparated && styles.lineSeparated,
435
+ this.props.popupHeader && styles.popupHeader,
436
+ this.props.style,
437
+ this.props.colourBrandingHeader && {
438
+ backgroundColor: this.props.colourBrandingHeader,
439
+ },
440
+ ]}
441
+ >
442
+ <View
443
+ style={[
444
+ styles.contentContainer,
445
+ this.props.popupHeader && styles.popupContentContainer,
446
+ this.props.contentContainerStyle,
447
+ this.props.colourBrandingHeader && {
448
+ backgroundColor: this.props.colourBrandingHeader,
449
+ },
450
+ ]}
451
+ >
452
+ {this.renderBackground()}
453
+ <StatusBar barStyle={this.state.barStyle} translucent />
454
+ <View
455
+ style={[
456
+ styles.headerContent,
457
+ this.props.popupHeader && styles.headerContentPopup,
458
+ ]}
459
+ >
460
+ {this.renderLeftIcon()}
461
+ {this.renderHeaderText()}
462
+ {this.renderRightIcon()}
463
+ {this.props.children}
464
+ </View>
465
+ </View>
466
+ {this.props.extraHeaderContent}
467
+ </View>
468
+ );
469
+ }
330
470
  }
331
471
 
332
472
  const styles = {
333
- container: {
334
- alignSelf: 'stretch',
335
- backgroundColor: '#fff',
336
- zIndex: 10,
337
- },
338
- containerShadow: {
339
- shadowColor: '#000',
340
- shadowOffset: {
341
- width: 0,
342
- height: 1,
343
- },
344
- shadowOpacity: 0.1,
345
- shadowRadius: 6,
346
- elevation: 3,
347
- },
348
- lineSeparated: {
349
- borderBottomWidth: 1,
350
- borderColor: LINEGREY,
351
- shadowOpacity: 0,
352
- elevation: 0,
353
- },
354
- popupHeader: {
355
- borderBottomWidth: 1,
356
- borderColor: LINEGREY,
357
- shadowOpacity: 0,
358
- elevation: 0,
359
- borderTopLeftRadius: 12,
360
- borderTopRightRadius: 12,
361
- },
362
- contentContainer: {
363
- height: StatusBarHeight(70),
364
- alignSelf: 'stretch',
365
- flexDirection: 'row',
366
- },
367
- popupContentContainer: {
368
- height: 70,
369
- borderTopLeftRadius: 12,
370
- borderTopRightRadius: 12,
371
- },
372
- transparentContainer: {
373
- backgroundColor: COLOUR_TRANSPARENT,
374
- shadowColor: COLOUR_TRANSPARENT,
375
- elevation: 0,
376
- },
377
- thumbnailStyle: {
378
- height: StatusBarHeight(70),
379
- width: null,
380
- position: 'absolute',
381
- top: 0,
382
- left: 0,
383
- resizeMode: 'cover',
384
- },
385
- thumbnailPopupHeader: {
386
- height: 70,
387
- width: '100%',
388
- borderTopLeftRadius: 12,
389
- borderTopRightRadius: 12,
390
- overflow: 'hidden',
391
- },
392
- headerContent: {
393
- alignSelf: 'stretch',
394
- flexDirection: 'row',
395
- flex: 1,
396
- paddingTop: StatusBarHeight(0),
397
- },
398
- headerContentPopup: {
399
- paddingTop: 0,
400
- },
401
- headerContentIcon: {
402
- height: 70,
403
- width: 55,
404
- alignItems: 'center',
405
- flexDirection: 'row',
406
- justifyContent: 'space-between',
407
- },
408
- absoluteRight: {
409
- height: 70,
410
- justifyContent: 'center',
411
- position: 'absolute',
412
- right: 0,
413
- top: StatusBarHeight(0),
414
- },
415
- leftIcon: {
416
- fontSize: 25,
417
- padding: 15,
418
- width: 55,
419
- textAlign: 'center',
420
- color: TEXT_LIGHT,
421
- },
422
- headerTextContainer: {
423
- height: 70,
424
- flex: 1,
425
- alignItems: 'center',
426
- flexDirection: 'row',
427
- justifyContent: 'space-between',
428
- },
429
- headerText: {
430
- fontSize: 16,
431
- flex: 1,
432
- fontFamily: 'sf-semibold',
433
- color: TEXT_DARK,
434
- textAlign: 'center',
435
- backgroundColor: 'rgba(255,255,255,0)',
436
- },
437
- buttonText: {
438
- fontSize: 15,
439
- fontFamily: 'sf-regular',
440
- width: 80,
441
- backgroundColor: 'rgba(255,255,255,0)',
442
- },
443
- rightIcon: {
444
- fontSize: 25,
445
- padding: 15,
446
- width: 55,
447
- textAlign: 'center',
448
- color: TEXT_LIGHT,
449
- },
450
- rightImage: {
451
- width: 24,
452
- height: 24,
453
- marginRight: 15,
454
- marginLeft: 13,
455
- },
456
- counter: {
457
- top: 15,
458
- right: 5,
459
- borderRadius: 10,
460
- position: 'absolute',
461
- height: 20,
462
- minWidth: 20,
463
- backgroundColor: COLOUR_GREEN,
464
- justifyContent: 'center',
465
- },
466
- counterText: {
467
- color: '#fff',
468
- textAlign: 'center',
469
- fontFamily: 'sf-bold',
470
- fontSize: 10,
471
- lineHeight: 12,
472
- backgroundColor: 'transparent',
473
- },
474
- smallCounter: {
475
- width: 5,
476
- height: 5,
477
- minWidth: 5,
478
- top: 20,
479
- right: 10,
480
- },
481
- headerPattern: {
482
- position: 'absolute',
483
- top: 0,
484
- left: 0,
485
- right: 0,
486
- bottom: 0,
487
- width: '100%',
488
- height: '100%',
489
- resizeMode: 'cover',
490
- },
473
+ container: {
474
+ alignSelf: "stretch",
475
+ backgroundColor: "#fff",
476
+ zIndex: 10,
477
+ },
478
+ containerShadow: {
479
+ shadowColor: "#000",
480
+ shadowOffset: {
481
+ width: 0,
482
+ height: 1,
483
+ },
484
+ shadowOpacity: 0.1,
485
+ shadowRadius: 6,
486
+ elevation: 3,
487
+ },
488
+ lineSeparated: {
489
+ borderBottomWidth: 1,
490
+ borderColor: LINEGREY,
491
+ shadowOpacity: 0,
492
+ elevation: 0,
493
+ },
494
+ popupHeader: {
495
+ borderBottomWidth: 1,
496
+ borderColor: LINEGREY,
497
+ shadowOpacity: 0,
498
+ elevation: 0,
499
+ borderTopLeftRadius: 12,
500
+ borderTopRightRadius: 12,
501
+ },
502
+ contentContainer: {
503
+ height: StatusBarHeight(70),
504
+ alignSelf: "stretch",
505
+ flexDirection: "row",
506
+ },
507
+ popupContentContainer: {
508
+ height: 70,
509
+ borderTopLeftRadius: 12,
510
+ borderTopRightRadius: 12,
511
+ },
512
+ transparentContainer: {
513
+ backgroundColor: COLOUR_TRANSPARENT,
514
+ shadowColor: COLOUR_TRANSPARENT,
515
+ elevation: 0,
516
+ },
517
+ thumbnailStyle: {
518
+ height: StatusBarHeight(70),
519
+ width: null,
520
+ position: "absolute",
521
+ top: 0,
522
+ left: 0,
523
+ resizeMode: "cover",
524
+ },
525
+ thumbnailPopupHeader: {
526
+ height: 70,
527
+ width: "100%",
528
+ borderTopLeftRadius: 12,
529
+ borderTopRightRadius: 12,
530
+ overflow: "hidden",
531
+ },
532
+ headerContent: {
533
+ alignSelf: "stretch",
534
+ flexDirection: "row",
535
+ flex: 1,
536
+ paddingTop: StatusBarHeight(0),
537
+ },
538
+ headerContentPopup: {
539
+ paddingTop: 0,
540
+ },
541
+ headerContentIcon: {
542
+ height: 70,
543
+ width: 55,
544
+ alignItems: "center",
545
+ flexDirection: "row",
546
+ justifyContent: "space-between",
547
+ },
548
+ absoluteRight: {
549
+ height: 70,
550
+ justifyContent: "center",
551
+ position: "absolute",
552
+ right: 0,
553
+ top: StatusBarHeight(0),
554
+ },
555
+ leftIcon: {
556
+ fontSize: 25,
557
+ padding: 15,
558
+ width: 55,
559
+ textAlign: "center",
560
+ color: TEXT_LIGHT,
561
+ },
562
+ headerTextContainer: {
563
+ height: 70,
564
+ flex: 1,
565
+ alignItems: "center",
566
+ flexDirection: "row",
567
+ justifyContent: "space-between",
568
+ },
569
+ headerText: {
570
+ fontSize: 16,
571
+ flex: 1,
572
+ fontFamily: "sf-semibold",
573
+ color: TEXT_DARK,
574
+ textAlign: "center",
575
+ backgroundColor: "rgba(255,255,255,0)",
576
+ },
577
+ buttonText: {
578
+ fontSize: 15,
579
+ fontFamily: "sf-regular",
580
+ width: 80,
581
+ backgroundColor: "rgba(255,255,255,0)",
582
+ },
583
+ rightIcon: {
584
+ fontSize: 25,
585
+ padding: 15,
586
+ width: 55,
587
+ textAlign: "center",
588
+ color: TEXT_LIGHT,
589
+ },
590
+ rightImage: {
591
+ width: 24,
592
+ height: 24,
593
+ marginRight: 15,
594
+ marginLeft: 13,
595
+ },
596
+ counter: {
597
+ top: 15,
598
+ right: 5,
599
+ borderRadius: 10,
600
+ position: "absolute",
601
+ height: 20,
602
+ minWidth: 20,
603
+ backgroundColor: COLOUR_GREEN,
604
+ justifyContent: "center",
605
+ },
606
+ counterText: {
607
+ color: "#fff",
608
+ textAlign: "center",
609
+ fontFamily: "sf-bold",
610
+ fontSize: 10,
611
+ lineHeight: 12,
612
+ backgroundColor: "transparent",
613
+ },
614
+ smallCounter: {
615
+ width: 5,
616
+ height: 5,
617
+ minWidth: 5,
618
+ top: 20,
619
+ right: 10,
620
+ },
621
+ headerPattern: {
622
+ position: "absolute",
623
+ top: 0,
624
+ left: 0,
625
+ right: 0,
626
+ bottom: 0,
627
+ width: "100%",
628
+ height: "100%",
629
+ resizeMode: "cover",
630
+ },
491
631
  };
492
632
 
493
- const mapStateToProps = state => {
494
- return {
495
- colourBrandingMain: getMainBrandingColourFromState(state),
496
- headerType: getSiteSettingFromState(
497
- state,
498
- 'HeaderType',
499
- getSiteSettingFromState(state, 'UseGradientHeader', Config.env.hasGradientHeader) ? 'gradient' : 'white',
500
- ),
501
- headerPattern: getSiteSettingFromState(state, 'HeaderPattern'),
502
- patternColour: getSiteSettingFromState(state, 'PatternColour'),
503
- };
633
+ const mapStateToProps = (state) => {
634
+ return {
635
+ colourBrandingMain: getMainBrandingColourFromState(state),
636
+ headerType: getSiteSettingFromState(
637
+ state,
638
+ "HeaderType",
639
+ getSiteSettingFromState(
640
+ state,
641
+ "UseGradientHeader",
642
+ Config.env.hasGradientHeader,
643
+ )
644
+ ? "gradient"
645
+ : "white",
646
+ ),
647
+ headerPattern: getSiteSettingFromState(state, "HeaderPattern"),
648
+ patternColour: getSiteSettingFromState(state, "PatternColour"),
649
+ };
504
650
  };
505
651
 
506
652
  export default connect(mapStateToProps, {})(Header);