@plusscommunities/pluss-core-app 8.0.29 → 8.0.31

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 (210) hide show
  1. package/dist/module/actions/FollowerActions.js +34 -0
  2. package/dist/module/actions/FollowerActions.js.map +1 -0
  3. package/dist/module/actions/MediaActions.js +29 -0
  4. package/dist/module/actions/MediaActions.js.map +1 -0
  5. package/dist/module/actions/ResidentActions.js +26 -0
  6. package/dist/module/actions/ResidentActions.js.map +1 -0
  7. package/dist/module/actions/UserActions.js +223 -0
  8. package/dist/module/actions/UserActions.js.map +1 -0
  9. package/dist/module/actions/UserSettingsActions.js +14 -0
  10. package/dist/module/actions/UserSettingsActions.js.map +1 -0
  11. package/dist/module/actions/index.js +6 -0
  12. package/dist/module/actions/index.js.map +1 -0
  13. package/dist/module/actions/types.js +17 -0
  14. package/dist/module/actions/types.js.map +1 -0
  15. package/dist/module/apis/analyticsActions.js +20 -0
  16. package/dist/module/apis/analyticsActions.js.map +1 -0
  17. package/dist/module/apis/contactActions.js +27 -0
  18. package/dist/module/apis/contactActions.js.map +1 -0
  19. package/dist/module/apis/eventActions.js +161 -0
  20. package/dist/module/apis/eventActions.js.map +1 -0
  21. package/dist/module/apis/fileActions.js +93 -0
  22. package/dist/module/apis/fileActions.js.map +1 -0
  23. package/dist/module/apis/followerActions.js +38 -0
  24. package/dist/module/apis/followerActions.js.map +1 -0
  25. package/dist/module/apis/index.js +13 -0
  26. package/dist/module/apis/index.js.map +1 -0
  27. package/dist/module/apis/notificationActions.js +60 -0
  28. package/dist/module/apis/notificationActions.js.map +1 -0
  29. package/dist/module/apis/profileActions.js +14 -0
  30. package/dist/module/apis/profileActions.js.map +1 -0
  31. package/dist/module/apis/reactionActions.js +76 -0
  32. package/dist/module/apis/reactionActions.js.map +1 -0
  33. package/dist/module/apis/settingActions.js +22 -0
  34. package/dist/module/apis/settingActions.js.map +1 -0
  35. package/dist/module/apis/stringActions.js +30 -0
  36. package/dist/module/apis/stringActions.js.map +1 -0
  37. package/dist/module/apis/typeActions.js +15 -0
  38. package/dist/module/apis/typeActions.js.map +1 -0
  39. package/dist/module/apis/userActions.js +104 -0
  40. package/dist/module/apis/userActions.js.map +1 -0
  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/assets/icons/reactions/heart.png +0 -0
  48. package/dist/module/assets/icons/reactions/party.png +0 -0
  49. package/dist/module/assets/icons/reactions/sad.png +0 -0
  50. package/dist/module/assets/icons/reactions/smile.png +0 -0
  51. package/dist/module/colours.js +165 -0
  52. package/dist/module/colours.js.map +1 -0
  53. package/dist/module/components/AddButton.js +43 -0
  54. package/dist/module/components/AddButton.js.map +1 -0
  55. package/dist/module/components/AddToCalendarButton.js +225 -0
  56. package/dist/module/components/AddToCalendarButton.js.map +1 -0
  57. package/dist/module/components/Attachment.js +55 -0
  58. package/dist/module/components/Attachment.js.map +1 -0
  59. package/dist/module/components/AudienceSelectorLauncher.js +64 -0
  60. package/dist/module/components/AudienceSelectorLauncher.js.map +1 -0
  61. package/dist/module/components/AudienceSelectorPage.js +351 -0
  62. package/dist/module/components/AudienceSelectorPage.js.map +1 -0
  63. package/dist/module/components/AutoOffsetImage.js +184 -0
  64. package/dist/module/components/AutoOffsetImage.js.map +1 -0
  65. package/dist/module/components/BackButton.js +58 -0
  66. package/dist/module/components/BackButton.js.map +1 -0
  67. package/dist/module/components/CalendarPopup.js +126 -0
  68. package/dist/module/components/CalendarPopup.js.map +1 -0
  69. package/dist/module/components/CategoryTabs.js +155 -0
  70. package/dist/module/components/CategoryTabs.js.map +1 -0
  71. package/dist/module/components/CommentReply.js +334 -0
  72. package/dist/module/components/CommentReply.js.map +1 -0
  73. package/dist/module/components/CommentSection.js +823 -0
  74. package/dist/module/components/CommentSection.js.map +1 -0
  75. package/dist/module/components/ConfirmPopup.js +109 -0
  76. package/dist/module/components/ConfirmPopup.js.map +1 -0
  77. package/dist/module/components/ConfirmationPopup.js +72 -0
  78. package/dist/module/components/ConfirmationPopup.js.map +1 -0
  79. package/dist/module/components/DocumentUploader.js +253 -0
  80. package/dist/module/components/DocumentUploader.js.map +1 -0
  81. package/dist/module/components/DropDownItem.js +75 -0
  82. package/dist/module/components/DropDownItem.js.map +1 -0
  83. package/dist/module/components/DropDownMenu.js +41 -0
  84. package/dist/module/components/DropDownMenu.js.map +1 -0
  85. package/dist/module/components/EmptyStateMain.js +51 -0
  86. package/dist/module/components/EmptyStateMain.js.map +1 -0
  87. package/dist/module/components/EmptyStateWidget.js +48 -0
  88. package/dist/module/components/EmptyStateWidget.js.map +1 -0
  89. package/dist/module/components/FontScaleButton.js +37 -0
  90. package/dist/module/components/FontScaleButton.js.map +1 -0
  91. package/dist/module/components/FontScalePopup.js +76 -0
  92. package/dist/module/components/FontScalePopup.js.map +1 -0
  93. package/dist/module/components/Forbidden.js +58 -0
  94. package/dist/module/components/Forbidden.js.map +1 -0
  95. package/dist/module/components/FormCard.js +25 -0
  96. package/dist/module/components/FormCard.js.map +1 -0
  97. package/dist/module/components/FormCardSection.js +214 -0
  98. package/dist/module/components/FormCardSection.js.map +1 -0
  99. package/dist/module/components/FormCardSectionOptionLauncher.js +73 -0
  100. package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -0
  101. package/dist/module/components/FormattedText.js +133 -0
  102. package/dist/module/components/FormattedText.js.map +1 -0
  103. package/dist/module/components/GenericInput.js +151 -0
  104. package/dist/module/components/GenericInput.js.map +1 -0
  105. package/dist/module/components/GenericInputSection.js +173 -0
  106. package/dist/module/components/GenericInputSection.js.map +1 -0
  107. package/dist/module/components/Header.js +459 -0
  108. package/dist/module/components/Header.js.map +1 -0
  109. package/dist/module/components/Icon.js +109 -0
  110. package/dist/module/components/Icon.js.map +1 -0
  111. package/dist/module/components/ImagePopup.js +400 -0
  112. package/dist/module/components/ImagePopup.js.map +1 -0
  113. package/dist/module/components/ImageUploadProgress.js +69 -0
  114. package/dist/module/components/ImageUploadProgress.js.map +1 -0
  115. package/dist/module/components/ImageUploader.js +831 -0
  116. package/dist/module/components/ImageUploader.js.map +1 -0
  117. package/dist/module/components/InlineButton.js +66 -0
  118. package/dist/module/components/InlineButton.js.map +1 -0
  119. package/dist/module/components/Input.js +156 -0
  120. package/dist/module/components/Input.js.map +1 -0
  121. package/dist/module/components/LoadingCircles.js +219 -0
  122. package/dist/module/components/LoadingCircles.js.map +1 -0
  123. package/dist/module/components/LoadingIndicator.js +86 -0
  124. package/dist/module/components/LoadingIndicator.js.map +1 -0
  125. package/dist/module/components/LoadingStateWidget.js +46 -0
  126. package/dist/module/components/LoadingStateWidget.js.map +1 -0
  127. package/dist/module/components/MediaPlayer.js +407 -0
  128. package/dist/module/components/MediaPlayer.js.map +1 -0
  129. package/dist/module/components/MiddlePopup.js +49 -0
  130. package/dist/module/components/MiddlePopup.js.map +1 -0
  131. package/dist/module/components/PDFPopup.js +296 -0
  132. package/dist/module/components/PDFPopup.js.map +1 -0
  133. package/dist/module/components/PlussChat.js +1078 -0
  134. package/dist/module/components/PlussChat.js.map +1 -0
  135. package/dist/module/components/PlussChatMessage.js +299 -0
  136. package/dist/module/components/PlussChatMessage.js.map +1 -0
  137. package/dist/module/components/PlussChatTime.js +59 -0
  138. package/dist/module/components/PlussChatTime.js.map +1 -0
  139. package/dist/module/components/Popup.js +126 -0
  140. package/dist/module/components/Popup.js.map +1 -0
  141. package/dist/module/components/PopupMenu.js +120 -0
  142. package/dist/module/components/PopupMenu.js.map +1 -0
  143. package/dist/module/components/PositionedImage.js +313 -0
  144. package/dist/module/components/PositionedImage.js.map +1 -0
  145. package/dist/module/components/ProfilePic.js +105 -0
  146. package/dist/module/components/ProfilePic.js.map +1 -0
  147. package/dist/module/components/RadioButton.js +78 -0
  148. package/dist/module/components/RadioButton.js.map +1 -0
  149. package/dist/module/components/Reaction.js +117 -0
  150. package/dist/module/components/Reaction.js.map +1 -0
  151. package/dist/module/components/Reactions.js +71 -0
  152. package/dist/module/components/Reactions.js.map +1 -0
  153. package/dist/module/components/SharingTools.js +189 -0
  154. package/dist/module/components/SharingTools.js.map +1 -0
  155. package/dist/module/components/Spinner.js +22 -0
  156. package/dist/module/components/Spinner.js.map +1 -0
  157. package/dist/module/components/StickyFooter.js +34 -0
  158. package/dist/module/components/StickyFooter.js.map +1 -0
  159. package/dist/module/components/Text.js +57 -0
  160. package/dist/module/components/Text.js.map +1 -0
  161. package/dist/module/components/TickIcon.js +24 -0
  162. package/dist/module/components/TickIcon.js.map +1 -0
  163. package/dist/module/components/Toggle.js +66 -0
  164. package/dist/module/components/Toggle.js.map +1 -0
  165. package/dist/module/components/TouchableSearchBar.js +68 -0
  166. package/dist/module/components/TouchableSearchBar.js.map +1 -0
  167. package/dist/module/components/UserListPopup.js +136 -0
  168. package/dist/module/components/UserListPopup.js.map +1 -0
  169. package/dist/module/components/UserListing.js +268 -0
  170. package/dist/module/components/UserListing.js.map +1 -0
  171. package/dist/module/components/VideoPopup.js +113 -0
  172. package/dist/module/components/VideoPopup.js.map +1 -0
  173. package/dist/module/components/WarningPopup.js +85 -0
  174. package/dist/module/components/WarningPopup.js.map +1 -0
  175. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +289 -0
  176. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -0
  177. package/dist/module/components/expo-image-picker-multiple/ImageTile.js +117 -0
  178. package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -0
  179. package/dist/module/components/index.js +60 -0
  180. package/dist/module/components/index.js.map +1 -0
  181. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +422 -0
  182. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -0
  183. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +387 -0
  184. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -0
  185. package/dist/module/config.js +27 -0
  186. package/dist/module/config.js.map +1 -0
  187. package/dist/module/constants.js +18 -0
  188. package/dist/module/constants.js.map +1 -0
  189. package/dist/module/helper.js +424 -0
  190. package/dist/module/helper.js.map +1 -0
  191. package/dist/module/index.js +13 -0
  192. package/dist/module/index.js.map +1 -0
  193. package/dist/module/js/images/detectFaces.js +31 -0
  194. package/dist/module/js/images/detectFaces.js.map +1 -0
  195. package/dist/module/js/images/findLandmarkRange.js +93 -0
  196. package/dist/module/js/images/findLandmarkRange.js.map +1 -0
  197. package/dist/module/js/images/getScaledOffset.js +81 -0
  198. package/dist/module/js/images/getScaledOffset.js.map +1 -0
  199. package/dist/module/js/site/getSiteLevelFromState.js +29 -0
  200. package/dist/module/js/site/getSiteLevelFromState.js.map +1 -0
  201. package/dist/module/js/site/isTVEnabled.js +10 -0
  202. package/dist/module/js/site/isTVEnabled.js.map +1 -0
  203. package/dist/module/session.js +58 -0
  204. package/dist/module/session.js.map +1 -0
  205. package/dist/module/styles.js +67 -0
  206. package/dist/module/styles.js.map +1 -0
  207. package/dist/module/withNavigationFocus.js +30 -0
  208. package/dist/module/withNavigationFocus.js.map +1 -0
  209. package/package.json +1 -1
  210. package/src/components/PDFPopup.js +130 -35
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Component","_","TextInput","View","TouchableWithoutFeedback","Text","Icon","TEXT_LIGHT","TEXT_DARK","TEXT_DARKEST","FontAwesome","GenericInput","constructor","props","state","showSecureText","inputRef","createRef","blur","current","toggleSecureText","setState","renderLeftIcon","icon","iconType","createElement","name","style","styles","searchIcon","type","iconStyle","renderRightIcon","secureTextEntry","onPress","bind","clearIcon","secureIcon","rightIcon","rightIconAction","hasClear","isEmpty","value","onChangeText","render","searchInputContainer","squaredCorners","squaredSearchInputContainer","autoGrow","paddingVertical","minHeight","height","containerStyle","maxFontSizeMultiplier","ref","placeholder","placeholderTextColor","autoCorrect","autoFocus","multiline","searchText","textAlignVertical","keyboardType","returnKeyType","selectionColor","underlineColorAndroid","editable","autoCapitalize","onKeyPress","onSubmitEditing","onFocus","onBlur","flex","borderRadius","backgroundColor","alignItems","flexDirection","paddingHorizontal","fontSize","color","marginRight","marginLeft","marginTop","marginBottom","fontFamily"],"sources":["GenericInput.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport _ from \"lodash\";\nimport { TextInput, View, TouchableWithoutFeedback } from \"react-native\";\nimport { Text } from \".\";\nimport { Icon } from \"@rneui/themed\";\nimport { TEXT_LIGHT, TEXT_DARK, TEXT_DARKEST } from \"../colours\";\nimport { FontAwesome } from \"./Icon\";\n\nclass GenericInput extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tshowSecureText: false,\n\t\t};\n\t\tthis.inputRef = React.createRef();\n\t}\n\n\tblur() {\n\t\tthis.inputRef.current.blur();\n\t}\n\n\ttoggleSecureText() {\n\t\tthis.setState({\n\t\t\tshowSecureText: !this.state.showSecureText,\n\t\t});\n\t}\n\n\trenderLeftIcon() {\n\t\tif (!this.props.icon) {\n\t\t\treturn null;\n\t\t}\n\t\tif (this.props.iconType && this.props.iconType === \"pl60\") {\n\t\t\treturn <FontAwesome name={this.props.icon} style={styles.searchIcon} />;\n\t\t}\n\t\treturn (\n\t\t\t<Icon\n\t\t\t\ttype=\"font-awesome\"\n\t\t\t\tname={this.props.icon}\n\t\t\t\ticonStyle={styles.searchIcon}\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderRightIcon() {\n\t\tif (this.props.secureTextEntry) {\n\t\t\treturn (\n\t\t\t\t<TouchableWithoutFeedback onPress={this.toggleSecureText.bind(this)}>\n\t\t\t\t\t<FontAwesome\n\t\t\t\t\t\tname={this.state.showSecureText ? \"eye-slash\" : \"eye\"}\n\t\t\t\t\t\tstyle={[styles.clearIcon, styles.secureIcon]}\n\t\t\t\t\t/>\n\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t);\n\t\t}\n\t\tif (this.props.rightIcon) {\n\t\t\tif (this.props.rightIconAction) {\n\t\t\t\treturn (\n\t\t\t\t\t<TouchableWithoutFeedback onPress={this.props.rightIconAction}>\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\tname={this.props.rightIcon}\n\t\t\t\t\t\t\ticonStyle={styles.clearIcon}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<Icon\n\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\tname={this.props.rightIcon}\n\t\t\t\t\ticonStyle={styles.clearIcon}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\tif (this.props.hasClear && !_.isEmpty(this.props.value)) {\n\t\t\treturn (\n\t\t\t\t<TouchableWithoutFeedback\n\t\t\t\t\tonPress={() => {\n\t\t\t\t\t\tthis.props.onChangeText(\"\");\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<FontAwesome name=\"circle-x\" style={styles.clearIcon} />\n\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={[\n\t\t\t\t\tstyles.searchInputContainer,\n\t\t\t\t\tthis.props.squaredCorners && styles.squaredSearchInputContainer,\n\t\t\t\t\tthis.props.autoGrow\n\t\t\t\t\t\t? { paddingVertical: 8, minHeight: 40 }\n\t\t\t\t\t\t: { height: 36 },\n\t\t\t\t\tthis.props.containerStyle,\n\t\t\t\t]}\n\t\t\t>\n\t\t\t\t{this.renderLeftIcon()}\n\t\t\t\t<TextInput\n\t\t\t\t\tmaxFontSizeMultiplier={1.2}\n\t\t\t\t\tref={this.inputRef}\n\t\t\t\t\tplaceholder={this.props.placeholder}\n\t\t\t\t\tplaceholderTextColor={TEXT_LIGHT}\n\t\t\t\t\tautoCorrect={\n\t\t\t\t\t\tthis.props.autoCorrect != null ? this.props.autoCorrect : false\n\t\t\t\t\t}\n\t\t\t\t\tautoFocus={\n\t\t\t\t\t\tthis.props.autoFocus != null ? this.props.autoFocus : false\n\t\t\t\t\t}\n\t\t\t\t\tautoGrow={this.props.autoGrow != null ? this.props.autoGrow : false}\n\t\t\t\t\tmultiline={\n\t\t\t\t\t\tthis.props.multiline != null ? this.props.multiline : false\n\t\t\t\t\t}\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\tstyles.searchText,\n\t\t\t\t\t\tthis.props.style,\n\t\t\t\t\t\t{ textAlignVertical: this.props.multiline ? \"top\" : \"center\" },\n\t\t\t\t\t\tthis.props.minHeight && { minHeight: this.props.minHeight },\n\t\t\t\t\t]}\n\t\t\t\t\tvalue={this.props.value}\n\t\t\t\t\tonChangeText={this.props.onChangeText}\n\t\t\t\t\tkeyboardType={this.props.keyboardType}\n\t\t\t\t\treturnKeyType={this.props.returnKeyType}\n\t\t\t\t\tselectionColor={TEXT_DARK}\n\t\t\t\t\tunderlineColorAndroid=\"rgba(0,0,0,0)\"\n\t\t\t\t\teditable={this.props.editable != null ? this.props.editable : true}\n\t\t\t\t\tautoCapitalize={this.props.autoCapitalize || \"none\"}\n\t\t\t\t\tonKeyPress={this.props.onKeyPress}\n\t\t\t\t\tonSubmitEditing={this.props.onSubmitEditing}\n\t\t\t\t\tonFocus={this.props.onFocus}\n\t\t\t\t\tonBlur={this.props.onBlur}\n\t\t\t\t\tsecureTextEntry={\n\t\t\t\t\t\tthis.props.secureTextEntry && !this.state.showSecureText\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{this.renderRightIcon()}\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tsearchInputContainer: {\n\t\tflex: 1,\n\t\tborderRadius: 25,\n\t\tbackgroundColor: \"#ebeff2\",\n\t\talignItems: \"center\",\n\t\tflexDirection: \"row\",\n\t\tpaddingHorizontal: 16,\n\t},\n\tsquaredSearchInputContainer: {\n\t\tborderRadius: 5,\n\t\tpaddingHorizontal: 8,\n\t},\n\tsearchIcon: {\n\t\tfontSize: 14,\n\t\tcolor: TEXT_LIGHT,\n\t\tmarginRight: 8,\n\t},\n\tclearIcon: {\n\t\tfontSize: 14,\n\t\tcolor: TEXT_LIGHT,\n\t\tmarginLeft: 8,\n\t\tmarginTop: 8,\n\t\tmarginBottom: 8,\n\t},\n\tsecureIcon: {\n\t\tfontSize: 20,\n\t},\n\tsearchText: {\n\t\tcolor: TEXT_DARKEST,\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 16,\n\t\tflex: 1,\n\t},\n};\n\nexport { GenericInput };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,SAAS,EAAEC,IAAI,EAAEC,wBAAwB,QAAQ,cAAc;AACxE,SAASC,IAAI,QAAQ,GAAG;AACxB,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,UAAU,EAAEC,SAAS,EAAEC,YAAY,QAAQ,YAAY;AAChE,SAASC,WAAW,QAAQ,QAAQ;AAEpC,MAAMC,YAAY,SAASX,SAAS,CAAC;EACpCY,WAAWA,CAACC,KAAK,EAAE;IAClB,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACC,KAAK,GAAG;MACZC,cAAc,EAAE;IACjB,CAAC;IACD,IAAI,CAACC,QAAQ,gBAAGjB,KAAK,CAACkB,SAAS,CAAC,CAAC;EAClC;EAEAC,IAAIA,CAAA,EAAG;IACN,IAAI,CAACF,QAAQ,CAACG,OAAO,CAACD,IAAI,CAAC,CAAC;EAC7B;EAEAE,gBAAgBA,CAAA,EAAG;IAClB,IAAI,CAACC,QAAQ,CAAC;MACbN,cAAc,EAAE,CAA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AAE;EACP;AACD,CAAC;AAED,SAAS7D,YAAY","ignoreList":[]}
@@ -0,0 +1,173 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ import React, { PureComponent } from "react";
3
+ import { View, TouchableOpacity } from "react-native";
4
+ import { Text } from "./Text";
5
+ import { Icon } from "@rneui/themed";
6
+ import { connect } from "react-redux";
7
+ import { GenericInput } from "./GenericInput";
8
+ import { TEXT_DARKEST, COLOUR_GREEN, COLOUR_GRAPEFRUIT, getMainBrandingColourFromState } from "../colours";
9
+ import { RadioButton } from "./RadioButton";
10
+ class GenericInputSection extends PureComponent {
11
+ renderValidationDot() {
12
+ if (!this.props.required) {
13
+ return null;
14
+ }
15
+ return /*#__PURE__*/React.createElement(View, {
16
+ style: [styles.validatorDot, this.props.isValid() ? styles.validatorTrue : styles.validatorFalse]
17
+ });
18
+ }
19
+ renderLabel() {
20
+ if (!this.props.label) {
21
+ return null;
22
+ }
23
+ return /*#__PURE__*/React.createElement(View, {
24
+ style: styles.labelContainer
25
+ }, /*#__PURE__*/React.createElement(Text, {
26
+ style: [styles.labelText, this.props.labelStyle]
27
+ }, this.props.label), this.renderValidationDot());
28
+ }
29
+ renderRadioOption(label, value, isActive, onChange, style) {
30
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
31
+ onPress: () => onChange(value),
32
+ key: label,
33
+ style: [styles.radioOption, style],
34
+ hitSlop: {
35
+ top: 8,
36
+ left: 8,
37
+ bottom: 8,
38
+ right: 8
39
+ }
40
+ }, /*#__PURE__*/React.createElement(RadioButton, {
41
+ onPress: () => onChange(value),
42
+ isActive: isActive,
43
+ iconSize: 22,
44
+ style: styles.radioOptionButton
45
+ }), /*#__PURE__*/React.createElement(Text, {
46
+ style: styles.radioOptionText
47
+ }, label));
48
+ }
49
+ renderInput() {
50
+ if (this.props.children) {
51
+ return this.props.children;
52
+ }
53
+ if (this.props.inputType === "toggle") {
54
+ return /*#__PURE__*/React.createElement(View, {
55
+ style: styles.radioOptionsContainer
56
+ }, this.renderRadioOption("Yes", true, this.props.value === true, this.props.onChange), this.renderRadioOption("No", false, this.props.value === false, this.props.onChange));
57
+ }
58
+ if (this.props.inputType === "radio") {
59
+ return /*#__PURE__*/React.createElement(View, null, this.props.options.map(o => {
60
+ return this.renderRadioOption(o.Label, o.Value, this.props.value === o.Value, this.props.onChange, styles.radioOptionVertical);
61
+ }));
62
+ }
63
+ if (this.props.inputType === "optionSelector") {
64
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
65
+ onPress: this.props.onPress
66
+ }, /*#__PURE__*/React.createElement(View, {
67
+ style: styles.optionSelector
68
+ }, /*#__PURE__*/React.createElement(Text, {
69
+ style: styles.optionSelectorText
70
+ }, this.props.value), /*#__PURE__*/React.createElement(Icon, {
71
+ name: "angle-right",
72
+ type: "font-awesome",
73
+ iconStyle: [styles.optionSelectorIcon, {
74
+ color: this.props.colourBrandingMain
75
+ }]
76
+ })));
77
+ }
78
+ return /*#__PURE__*/React.createElement(GenericInput, _extends({}, this.props, {
79
+ containerStyle: [styles.input, this.props.containerStyle]
80
+ }));
81
+ }
82
+ renderError() {
83
+ if (this.props.showError === true && !this.props.isValid()) {
84
+ return /*#__PURE__*/React.createElement(Text, {
85
+ style: styles.errorText
86
+ }, this.props.errorText || "Required");
87
+ }
88
+ return null;
89
+ }
90
+ render() {
91
+ return /*#__PURE__*/React.createElement(View, {
92
+ style: [styles.container, this.props.sectionStyle]
93
+ }, this.renderLabel(), this.renderInput(), this.renderError());
94
+ }
95
+ }
96
+ const styles = {
97
+ container: {},
98
+ labelContainer: {
99
+ flexDirection: "row",
100
+ alignItems: "center"
101
+ },
102
+ labelText: {
103
+ fontFamily: "sf-semibold",
104
+ fontSize: 16,
105
+ color: TEXT_DARKEST
106
+ },
107
+ input: {
108
+ marginTop: 8
109
+ },
110
+ validatorDot: {
111
+ height: 6,
112
+ width: 6,
113
+ borderRadius: 3,
114
+ marginLeft: 8
115
+ },
116
+ validatorTrue: {
117
+ backgroundColor: COLOUR_GREEN
118
+ },
119
+ validatorFalse: {
120
+ backgroundColor: COLOUR_GRAPEFRUIT
121
+ },
122
+ radioOptionsContainer: {
123
+ flexDirection: "row",
124
+ alignItems: "center",
125
+ marginTop: 8
126
+ },
127
+ radioOptionVertical: {
128
+ marginTop: 16
129
+ },
130
+ radioOption: {
131
+ flexDirection: "row",
132
+ alignItems: "center",
133
+ marginRight: 24
134
+ },
135
+ radioOptionButton: {
136
+ marginRight: 8
137
+ },
138
+ radioOptionText: {
139
+ fontFamily: "sf-medium",
140
+ fontSize: 14,
141
+ color: TEXT_DARKEST
142
+ },
143
+ optionSelector: {
144
+ marginTop: 8,
145
+ flex: 1,
146
+ height: 36,
147
+ backgroundColor: "#ebeff2",
148
+ alignItems: "center",
149
+ flexDirection: "row",
150
+ justifyContent: "space-between",
151
+ borderRadius: 5,
152
+ paddingHorizontal: 8
153
+ },
154
+ optionSelectorText: {
155
+ color: TEXT_DARKEST,
156
+ fontFamily: "sf-regular",
157
+ fontSize: 16
158
+ },
159
+ errorText: {
160
+ paddingTop: 4,
161
+ fontSize: 13,
162
+ fontFamily: "sf-regular",
163
+ color: COLOUR_GRAPEFRUIT
164
+ }
165
+ };
166
+ const mapStateToProps = state => {
167
+ return {
168
+ colourBrandingMain: getMainBrandingColourFromState(state)
169
+ };
170
+ };
171
+ const genericInputSection = connect(mapStateToProps, {})(GenericInputSection);
172
+ export { genericInputSection as GenericInputSection };
173
+ //# sourceMappingURL=GenericInputSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","PureComponent","View","TouchableOpacity","Text","Icon","connect","GenericInput","TEXT_DARKEST","COLOUR_GREEN","COLOUR_GRAPEFRUIT","getMainBrandingColourFromState","RadioButton","GenericInputSection","renderValidationDot","props","required","createElement","style","styles","validatorDot","isValid","validatorTrue","validatorFalse","renderLabel","label","labelContainer","labelText","labelStyle","renderRadioOption","value","isActive","onChange","onPress","key","radioOption","hitSlop","top","left","bottom","right","iconSize","radioOptionButton","radioOptionText","renderInput","children","inputType","radioOptionsContainer","options","map","o","Label","Value","radioOptionVertical","optionSelector","optionSelectorText","name","type","iconStyle","optionSelectorIcon","color","colourBrandingMain","_extends","containerStyle","input","renderError","showError","errorText","render","container","sectionStyle","flexDirection","alignItems","fontFamily","fontSize","marginTop","height","width","borderRadius","marginLeft","backgroundColor","marginRight","flex","justifyContent","paddingHorizontal","paddingTop","mapStateToProps","state","genericInputSection"],"sources":["GenericInputSection.js"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport { View, TouchableOpacity } from \"react-native\";\nimport { Text } from \"./Text\";\nimport { Icon } from \"@rneui/themed\";\nimport { connect } from \"react-redux\";\nimport { GenericInput } from \"./GenericInput\";\nimport {\n\tTEXT_DARKEST,\n\tCOLOUR_GREEN,\n\tCOLOUR_GRAPEFRUIT,\n\tgetMainBrandingColourFromState,\n} from \"../colours\";\nimport { RadioButton } from \"./RadioButton\";\n\nclass GenericInputSection extends PureComponent {\n\trenderValidationDot() {\n\t\tif (!this.props.required) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={[\n\t\t\t\t\tstyles.validatorDot,\n\t\t\t\t\tthis.props.isValid() ? styles.validatorTrue : styles.validatorFalse,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderLabel() {\n\t\tif (!this.props.label) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={styles.labelContainer}>\n\t\t\t\t<Text style={[styles.labelText, this.props.labelStyle]}>\n\t\t\t\t\t{this.props.label}\n\t\t\t\t</Text>\n\t\t\t\t{this.renderValidationDot()}\n\t\t\t</View>\n\t\t);\n\t}\n\n\trenderRadioOption(label, value, isActive, onChange, style) {\n\t\treturn (\n\t\t\t<TouchableOpacity\n\t\t\t\tonPress={() => onChange(value)}\n\t\t\t\tkey={label}\n\t\t\t\tstyle={[styles.radioOption, style]}\n\t\t\t\thitSlop={{ top: 8, left: 8, bottom: 8, right: 8 }}\n\t\t\t>\n\t\t\t\t<RadioButton\n\t\t\t\t\tonPress={() => onChange(value)}\n\t\t\t\t\tisActive={isActive}\n\t\t\t\t\ticonSize={22}\n\t\t\t\t\tstyle={styles.radioOptionButton}\n\t\t\t\t/>\n\t\t\t\t<Text style={styles.radioOptionText}>{label}</Text>\n\t\t\t</TouchableOpacity>\n\t\t);\n\t}\n\n\trenderInput() {\n\t\tif (this.props.children) {\n\t\t\treturn this.props.children;\n\t\t}\n\t\tif (this.props.inputType === \"toggle\") {\n\t\t\treturn (\n\t\t\t\t<View style={styles.radioOptionsContainer}>\n\t\t\t\t\t{this.renderRadioOption(\n\t\t\t\t\t\t\"Yes\",\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tthis.props.value === true,\n\t\t\t\t\t\tthis.props.onChange,\n\t\t\t\t\t)}\n\t\t\t\t\t{this.renderRadioOption(\n\t\t\t\t\t\t\"No\",\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tthis.props.value === false,\n\t\t\t\t\t\tthis.props.onChange,\n\t\t\t\t\t)}\n\t\t\t\t</View>\n\t\t\t);\n\t\t}\n\t\tif (this.props.inputType === \"radio\") {\n\t\t\treturn (\n\t\t\t\t<View>\n\t\t\t\t\t{this.props.options.map((o) => {\n\t\t\t\t\t\treturn this.renderRadioOption(\n\t\t\t\t\t\t\to.Label,\n\t\t\t\t\t\t\to.Value,\n\t\t\t\t\t\t\tthis.props.value === o.Value,\n\t\t\t\t\t\t\tthis.props.onChange,\n\t\t\t\t\t\t\tstyles.radioOptionVertical,\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</View>\n\t\t\t);\n\t\t}\n\t\tif (this.props.inputType === \"optionSelector\") {\n\t\t\treturn (\n\t\t\t\t<TouchableOpacity onPress={this.props.onPress}>\n\t\t\t\t\t<View style={styles.optionSelector}>\n\t\t\t\t\t\t<Text style={styles.optionSelectorText}>{this.props.value}</Text>\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tname=\"angle-right\"\n\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\ticonStyle={[\n\t\t\t\t\t\t\t\tstyles.optionSelectorIcon,\n\t\t\t\t\t\t\t\t{ color: this.props.colourBrandingMain },\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t</TouchableOpacity>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<GenericInput\n\t\t\t\t{...this.props}\n\t\t\t\tcontainerStyle={[styles.input, this.props.containerStyle]}\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderError() {\n\t\tif (this.props.showError === true && !this.props.isValid()) {\n\t\t\treturn (\n\t\t\t\t<Text style={styles.errorText}>\n\t\t\t\t\t{this.props.errorText || \"Required\"}\n\t\t\t\t</Text>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<View style={[styles.container, this.props.sectionStyle]}>\n\t\t\t\t{this.renderLabel()}\n\t\t\t\t{this.renderInput()}\n\t\t\t\t{this.renderError()}\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tcontainer: {},\n\tlabelContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t},\n\tlabelText: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 16,\n\t\tcolor: TEXT_DARKEST,\n\t},\n\tinput: {\n\t\tmarginTop: 8,\n\t},\n\tvalidatorDot: {\n\t\theight: 6,\n\t\twidth: 6,\n\t\tborderRadius: 3,\n\t\tmarginLeft: 8,\n\t},\n\tvalidatorTrue: {\n\t\tbackgroundColor: COLOUR_GREEN,\n\t},\n\tvalidatorFalse: {\n\t\tbackgroundColor: COLOUR_GRAPEFRUIT,\n\t},\n\tradioOptionsContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tmarginTop: 8,\n\t},\n\tradioOptionVertical: {\n\t\tmarginTop: 16,\n\t},\n\tradioOption: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tmarginRight: 24,\n\t},\n\tradioOptionButton: {\n\t\tmarginRight: 8,\n\t},\n\tradioOptionText: {\n\t\tfontFamily: \"sf-medium\",\n\t\tfontSize: 14,\n\t\tcolor: TEXT_DARKEST,\n\t},\n\toptionSelector: {\n\t\tmarginTop: 8,\n\t\tflex: 1,\n\t\theight: 36,\n\t\tbackgroundColor: \"#ebeff2\",\n\t\talignItems: \"center\",\n\t\tflexDirection: \"row\",\n\t\tjustifyContent: \"space-between\",\n\t\tborderRadius: 5,\n\t\tpaddingHorizontal: 8,\n\t},\n\toptionSelectorText: {\n\t\tcolor: TEXT_DARKEST,\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 16,\n\t},\n\terrorText: {\n\t\tpaddingTop: 4,\n\t\tfontSize: 13,\n\t\tfontFamily: \"sf-regular\",\n\t\tcolor: COLOUR_GRAPEFRUIT,\n\t},\n};\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t};\n};\n\nconst genericInputSection = connect(mapStateToProps, {})(GenericInputSection);\nexport { genericInputSection as GenericInputSection };\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AACrD,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SACCC,YAAY,EACZC,YAAY,EACZC,iBAAiB,EACjBC,8BAA8B,QACxB,YAAY;AACnB,SAASC,WAAW,QAAQ,eAAe;AAE3C,MAAMC,mBAAmB,SAASZ,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ACVI,eAAe,EAAE,SAAS;IAC1BR,UAAU,EAAE,QAAQ;IACpBD,aAAa,EAAE,KAAK;IACpBY,cAAc,EAAE,eAAe;IAC/BL,YAAY,EAAE,CAAC;IACfM,iBAAiB,EAAE;EACpB,CAAC;EACD7B,kBAAkB,EAAE;IACnBK,KAAK,EAAEpD,YAAY;IACnBiE,UAAU,EAAE,YAAY;IACxBC,QAAQ,EAAE;EACX,CAAC;EACDP,SAAS,EAAE;IACVkB,UAAU,EAAE,CAAC;IACbX,QAAQ,EAAE,EAAE;IACZD,UAAU,EAAE,YAAY;IACxBb,KAAK,EAAElD;EACR;AACD,CAAC;AAED,MAAM4E,eAAe,GAAIC,KAAK,IAAK;EAClC,OAAO;IACN1B,kBAAkB,EAAElD,8BAA8B,CAAC4E,KAAK;EACzD,CAAC;AACF,CAAC;AAED,MAAMC,mBAAmB,GAAGlF,OAAO,CAACgF,eAAe,EAAE,CAAC,CAAC,CAAC,CAACzE,mBAAmB,CAAC;AAC7E,SAAS2E,mBAAmB,IAAI3E,mBAAmB","ignoreList":[]}
@@ -0,0 +1,459 @@
1
+ import React, { Component } from "react";
2
+ import { Text } from "@plusscommunities/pluss-core-app/components";
3
+ import { Animated, View, StatusBar, Image, Dimensions, TouchableOpacity, Platform } from "react-native";
4
+ import { Icon } from "@rneui/themed";
5
+ import { LinearGradient } from "expo-linear-gradient";
6
+ import { connect } from "react-redux";
7
+ // import {
8
+ // StatusBarHeight,
9
+ // COLOUR_TRANSPARENT,
10
+ // TEXT_DARK,
11
+ // TEXT_LIGHT,
12
+ // LINEGREY,
13
+ // COLOUR_GREEN,
14
+ // getMainBrandingColourFromState,
15
+ // hexToRGBAstring,
16
+ // getSiteSettingFromState,
17
+ // } from '../../js';
18
+ import { StatusBarHeight, getSiteSettingFromState } from "../helper";
19
+ import { COLOUR_TRANSPARENT, TEXT_DARK, TEXT_LIGHT, LINEGREY, COLOUR_GREEN, getMainBrandingColourFromState, hexToRGBAstring } from "../colours";
20
+ import { FontAwesome } from "./Icon";
21
+ import Config from "../config";
22
+ // import { HAS_GRADIENT_HEADER } from '../../config';
23
+
24
+ class Header extends Component {
25
+ constructor(props) {
26
+ super(props);
27
+ this.state = {};
28
+ }
29
+ UNSAFE_componentWillMount() {
30
+ let barStyle = Platform.select({
31
+ ios: "dark-content",
32
+ android: "default"
33
+ });
34
+ if (this.props.barStyle) {
35
+ barStyle = this.props.barStyle;
36
+ } else if (this.props.headerType !== "white" && !this.props.noGradient && !this.props.transparent) {
37
+ barStyle = "light-content";
38
+ }
39
+ this.setState({
40
+ windowWidth: Dimensions.get("window").width,
41
+ barStyle
42
+ });
43
+ }
44
+ getTextColourStyle() {
45
+ if (this.props.textColour) {
46
+ return {
47
+ color: this.props.textColour
48
+ };
49
+ }
50
+ if (this.props.headerType !== "white" && !this.props.noGradient && !this.props.transparent) {
51
+ return {
52
+ color: "#fff"
53
+ };
54
+ }
55
+ return null;
56
+ }
57
+ renderBackground() {
58
+ if (this.props.headerBackground) return this.props.headerBackground;
59
+ if (this.props.headerImage) {
60
+ return /*#__PURE__*/React.createElement(Image, {
61
+ style: [styles.thumbnailStyle, {
62
+ width: this.state.windowWidth
63
+ }],
64
+ source: {
65
+ uri: this.props.headerImage
66
+ }
67
+ });
68
+ }
69
+ if (this.props.headerType === "pattern" && !this.props.noGradient && !this.props.transparent) {
70
+ return /*#__PURE__*/React.createElement(View, {
71
+ style: [styles.thumbnailStyle, this.props.contentContainerStyle, {
72
+ backgroundColor: this.props.colourBrandingMain,
73
+ width: this.state.windowWidth
74
+ }, this.props.popupHeader && styles.thumbnailPopupHeader]
75
+ }, /*#__PURE__*/React.createElement(Image, {
76
+ style: [styles.headerPattern, this.props.patternColour && {
77
+ tintColor: this.props.patternColour
78
+ }],
79
+ source: {
80
+ uri: this.props.headerPattern
81
+ }
82
+ }));
83
+ }
84
+ if (this.props.headerType === "block" && !this.props.noGradient && !this.props.transparent) {
85
+ return /*#__PURE__*/React.createElement(View, {
86
+ style: [styles.thumbnailStyle, this.props.contentContainerStyle, {
87
+ backgroundColor: this.props.colourBrandingMain,
88
+ width: this.state.windowWidth
89
+ }, this.props.popupHeader && styles.thumbnailPopupHeader]
90
+ });
91
+ }
92
+ if (this.props.headerType === "gradient" && !this.props.noGradient && !this.props.transparent) {
93
+ return /*#__PURE__*/React.createElement(View, {
94
+ style: [styles.thumbnailStyle, this.props.contentContainerStyle, {
95
+ width: this.state.windowWidth
96
+ }, this.props.popupHeader && styles.thumbnailPopupHeader]
97
+ }, /*#__PURE__*/React.createElement(LinearGradient, {
98
+ style: {
99
+ flex: 1
100
+ },
101
+ colors: [this.props.colourBrandingMain, hexToRGBAstring(this.props.colourBrandingMain, 0.7)],
102
+ start: {
103
+ x: 0,
104
+ y: 0
105
+ },
106
+ end: {
107
+ x: 1,
108
+ y: 1
109
+ },
110
+ locations: [0.4, 1]
111
+ }));
112
+ }
113
+ return null;
114
+ }
115
+ renderLeftBubble() {
116
+ if (!this.props.hasLeftBubble) {
117
+ return null;
118
+ }
119
+ return /*#__PURE__*/React.createElement(View, {
120
+ style: [styles.counter, styles.smallCounter]
121
+ });
122
+ }
123
+ renderLeftIcon() {
124
+ if (!this.props.leftIcon && !this.props.leftText || !this.props.onPressLeft) {
125
+ return null;
126
+ }
127
+ if (this.props.leftText) {
128
+ return /*#__PURE__*/React.createElement(View, {
129
+ style: [styles.headerContentIcon, {
130
+ width: "auto"
131
+ }]
132
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
133
+ onPress: this.props.onPressLeft,
134
+ activeOpacity: 0.6
135
+ }, /*#__PURE__*/React.createElement(Text, {
136
+ style: [styles.buttonText, {
137
+ paddingRight: 5,
138
+ paddingLeft: 15,
139
+ color: this.props.colourBrandingMain
140
+ }, this.props.leftTextStyle, this.props.headerType !== "white" && !this.props.noGradient && !this.props.transparent && {
141
+ color: "#fff"
142
+ }]
143
+ }, this.props.leftText)));
144
+ }
145
+ if (this.props.leftIconType && this.props.leftIconType === "pluss") {
146
+ return /*#__PURE__*/React.createElement(View, {
147
+ style: styles.headerContentIcon
148
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
149
+ onPress: this.props.onPressLeft,
150
+ activeOpacity: 0.6
151
+ }, /*#__PURE__*/React.createElement(View, {
152
+ style: styles.headerContentIcon
153
+ }, /*#__PURE__*/React.createElement(FontAwesome, {
154
+ name: this.props.leftIcon,
155
+ style: [styles.leftIcon, this.props.leftIconStyle, this.getTextColourStyle()]
156
+ }), this.renderLeftBubble())));
157
+ }
158
+ return /*#__PURE__*/React.createElement(View, {
159
+ style: styles.headerContentIcon
160
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
161
+ onPress: this.props.onPressLeft,
162
+ activeOpacity: 0.6
163
+ }, /*#__PURE__*/React.createElement(Icon, {
164
+ name: this.props.leftIcon,
165
+ style: styles.headerContentIcon,
166
+ type: "font-awesome",
167
+ iconStyle: [styles.leftIcon, this.props.leftIconStyle, this.getTextColourStyle()]
168
+ }), this.renderLeftBubble()));
169
+ }
170
+ renderHeaderText() {
171
+ if (!this.props.text) {
172
+ if (this.props.centerContent) {
173
+ return this.props.centerContent;
174
+ }
175
+ return null;
176
+ }
177
+ if (this.props.onTextPress) {
178
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
179
+ onPress: this.props.onTextPress,
180
+ activeOpacity: 0.6,
181
+ style: [styles.headerTextContainer, this.props.leftIcon && (!this.props.rightIcon && !this.props.rightText || this.props.absoluteRight) && {
182
+ paddingRight: 55
183
+ }, this.props.textContainerStyle]
184
+ }, /*#__PURE__*/React.createElement(Text, {
185
+ style: [styles.headerText, this.props.textStyle, this.getTextColourStyle()],
186
+ numberOfLines: 1,
187
+ ellipsizeMode: "tail"
188
+ }, this.props.text));
189
+ }
190
+ return /*#__PURE__*/React.createElement(View, {
191
+ style: [styles.headerTextContainer, this.props.leftIcon && (!this.props.rightIcon && !this.props.rightText || this.props.absoluteRight) && {
192
+ paddingRight: 55
193
+ }, this.props.rightIcon && (!this.props.leftIcon && !this.props.leftText || this.props.absoluteLeft) && {
194
+ paddingLeft: 55
195
+ }, this.props.textContainerStyle]
196
+ }, /*#__PURE__*/React.createElement(Text, {
197
+ style: [styles.headerText, this.props.textStyle, this.getTextColourStyle()],
198
+ numberOfLines: 1,
199
+ ellipsizeMode: "tail"
200
+ }, this.props.text));
201
+ }
202
+ renderRightIcon() {
203
+ if (this.props.rightContent) {
204
+ return this.props.rightContent;
205
+ }
206
+ if (!this.props.onPressRight) {
207
+ return null;
208
+ }
209
+ if (this.props.rightText && this.props.onPressRight) {
210
+ return /*#__PURE__*/React.createElement(View, {
211
+ style: [styles.headerContentIcon, {
212
+ width: "auto"
213
+ }, this.props.absoluteRight && styles.absoluteRight, this.props.rightContainerStyle]
214
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
215
+ onPress: this.props.onPressRight,
216
+ activeOpacity: 0.6
217
+ }, /*#__PURE__*/React.createElement(Text, {
218
+ style: [styles.buttonText, {
219
+ paddingRight: 15,
220
+ paddingLeft: 5,
221
+ textAlign: "right",
222
+ fontFamily: "sf-semibold",
223
+ color: this.props.colourBrandingMain
224
+ }, this.getTextColourStyle(), this.props.optionalRightStyle]
225
+ }, this.props.rightText)));
226
+ }
227
+ if (!this.props.rightIcon) {
228
+ if (this.props.rightImage) {
229
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
230
+ onPress: this.props.onPressRight,
231
+ activeOpacity: 0.6
232
+ }, /*#__PURE__*/React.createElement(View, {
233
+ style: styles.headerContentIcon
234
+ }, /*#__PURE__*/React.createElement(Image, {
235
+ source: {
236
+ uri: this.props.rightImage
237
+ },
238
+ style: styles.rightImage,
239
+ resizeMode: "contain"
240
+ })));
241
+ }
242
+ return null;
243
+ }
244
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
245
+ onPress: this.props.onPressRight,
246
+ activeOpacity: 0.6
247
+ }, this.props.rightIconType && this.props.rightIconType === "pluss" ? /*#__PURE__*/React.createElement(View, {
248
+ style: styles.headerContentIcon
249
+ }, /*#__PURE__*/React.createElement(FontAwesome, {
250
+ name: this.props.rightIcon,
251
+ style: [styles.rightIcon, this.getTextColourStyle(), this.props.rightIconStyle]
252
+ })) : /*#__PURE__*/React.createElement(Icon, {
253
+ name: this.props.rightIcon,
254
+ style: styles.headerContentIcon,
255
+ type: this.props.rightIconType ? this.props.rightIconType : "font-awesome",
256
+ iconStyle: [styles.rightIcon, this.getTextColourStyle(), this.props.rightIconStyle]
257
+ }));
258
+ }
259
+ render() {
260
+ if (this.props.animatedHeader) {
261
+ return /*#__PURE__*/React.createElement(Animated.View, {
262
+ style: [styles.container, !this.props.noShadow && styles.containerShadow, this.props.transparent && styles.transparentContainer, this.props.style, {
263
+ backgroundColor: this.props.headerColourOffset,
264
+ elevation: this.props.headerElev,
265
+ shadowColor: this.props.headerShadow
266
+ }]
267
+ }, this.renderBackground(), /*#__PURE__*/React.createElement(StatusBar, {
268
+ barStyle: this.state.barStyle,
269
+ translucent: true
270
+ }), /*#__PURE__*/React.createElement(View, {
271
+ style: styles.headerContent
272
+ }, this.renderLeftIcon(), this.renderHeaderText(), this.renderRightIcon(), this.props.children), this.props.extraHeaderContent);
273
+ }
274
+ return /*#__PURE__*/React.createElement(View, {
275
+ style: [styles.container, !this.props.noShadow && styles.containerShadow, this.props.transparent && styles.transparentContainer, this.props.lineSeparated && styles.lineSeparated, this.props.popupHeader && styles.popupHeader, this.props.style, this.props.colourBrandingHeader && {
276
+ backgroundColor: this.props.colourBrandingHeader
277
+ }]
278
+ }, /*#__PURE__*/React.createElement(View, {
279
+ style: [styles.contentContainer, this.props.popupHeader && styles.popupContentContainer, this.props.contentContainerStyle, this.props.colourBrandingHeader && {
280
+ backgroundColor: this.props.colourBrandingHeader
281
+ }]
282
+ }, this.renderBackground(), /*#__PURE__*/React.createElement(StatusBar, {
283
+ barStyle: this.state.barStyle,
284
+ translucent: true
285
+ }), /*#__PURE__*/React.createElement(View, {
286
+ style: [styles.headerContent, this.props.popupHeader && styles.headerContentPopup]
287
+ }, this.renderLeftIcon(), this.renderHeaderText(), this.renderRightIcon(), this.props.children)), this.props.extraHeaderContent);
288
+ }
289
+ }
290
+ const styles = {
291
+ container: {
292
+ alignSelf: "stretch",
293
+ backgroundColor: "#fff",
294
+ zIndex: 10
295
+ },
296
+ containerShadow: {
297
+ shadowColor: "#000",
298
+ shadowOffset: {
299
+ width: 0,
300
+ height: 1
301
+ },
302
+ shadowOpacity: 0.1,
303
+ shadowRadius: 6,
304
+ elevation: 3
305
+ },
306
+ lineSeparated: {
307
+ borderBottomWidth: 1,
308
+ borderColor: LINEGREY,
309
+ shadowOpacity: 0,
310
+ elevation: 0
311
+ },
312
+ popupHeader: {
313
+ borderBottomWidth: 1,
314
+ borderColor: LINEGREY,
315
+ shadowOpacity: 0,
316
+ elevation: 0,
317
+ borderTopLeftRadius: 12,
318
+ borderTopRightRadius: 12
319
+ },
320
+ contentContainer: {
321
+ height: StatusBarHeight(70),
322
+ alignSelf: "stretch",
323
+ flexDirection: "row"
324
+ },
325
+ popupContentContainer: {
326
+ height: 70,
327
+ borderTopLeftRadius: 12,
328
+ borderTopRightRadius: 12
329
+ },
330
+ transparentContainer: {
331
+ backgroundColor: COLOUR_TRANSPARENT,
332
+ shadowColor: COLOUR_TRANSPARENT,
333
+ elevation: 0
334
+ },
335
+ thumbnailStyle: {
336
+ height: StatusBarHeight(70),
337
+ width: null,
338
+ position: "absolute",
339
+ top: 0,
340
+ left: 0,
341
+ resizeMode: "cover"
342
+ },
343
+ thumbnailPopupHeader: {
344
+ height: 70,
345
+ width: "100%",
346
+ borderTopLeftRadius: 12,
347
+ borderTopRightRadius: 12,
348
+ overflow: "hidden"
349
+ },
350
+ headerContent: {
351
+ alignSelf: "stretch",
352
+ flexDirection: "row",
353
+ flex: 1,
354
+ paddingTop: StatusBarHeight(0)
355
+ },
356
+ headerContentPopup: {
357
+ paddingTop: 0
358
+ },
359
+ headerContentIcon: {
360
+ height: 70,
361
+ width: 55,
362
+ alignItems: "center",
363
+ flexDirection: "row",
364
+ justifyContent: "space-between"
365
+ },
366
+ absoluteRight: {
367
+ height: 70,
368
+ justifyContent: "center",
369
+ position: "absolute",
370
+ right: 0,
371
+ top: StatusBarHeight(0)
372
+ },
373
+ leftIcon: {
374
+ fontSize: 25,
375
+ padding: 15,
376
+ width: 55,
377
+ textAlign: "center",
378
+ color: TEXT_LIGHT
379
+ },
380
+ headerTextContainer: {
381
+ height: 70,
382
+ flex: 1,
383
+ alignItems: "center",
384
+ flexDirection: "row",
385
+ justifyContent: "space-between"
386
+ },
387
+ headerText: {
388
+ fontSize: 16,
389
+ flex: 1,
390
+ fontFamily: "sf-semibold",
391
+ color: TEXT_DARK,
392
+ textAlign: "center",
393
+ backgroundColor: "rgba(255,255,255,0)"
394
+ },
395
+ buttonText: {
396
+ fontSize: 15,
397
+ fontFamily: "sf-regular",
398
+ width: 80,
399
+ backgroundColor: "rgba(255,255,255,0)"
400
+ },
401
+ rightIcon: {
402
+ fontSize: 25,
403
+ padding: 15,
404
+ width: 55,
405
+ textAlign: "center",
406
+ color: TEXT_LIGHT
407
+ },
408
+ rightImage: {
409
+ width: 24,
410
+ height: 24,
411
+ marginRight: 15,
412
+ marginLeft: 13
413
+ },
414
+ counter: {
415
+ top: 15,
416
+ right: 5,
417
+ borderRadius: 10,
418
+ position: "absolute",
419
+ height: 20,
420
+ minWidth: 20,
421
+ backgroundColor: COLOUR_GREEN,
422
+ justifyContent: "center"
423
+ },
424
+ counterText: {
425
+ color: "#fff",
426
+ textAlign: "center",
427
+ fontFamily: "sf-bold",
428
+ fontSize: 10,
429
+ lineHeight: 12,
430
+ backgroundColor: "transparent"
431
+ },
432
+ smallCounter: {
433
+ width: 5,
434
+ height: 5,
435
+ minWidth: 5,
436
+ top: 20,
437
+ right: 10
438
+ },
439
+ headerPattern: {
440
+ position: "absolute",
441
+ top: 0,
442
+ left: 0,
443
+ right: 0,
444
+ bottom: 0,
445
+ width: "100%",
446
+ height: "100%",
447
+ resizeMode: "cover"
448
+ }
449
+ };
450
+ const mapStateToProps = state => {
451
+ return {
452
+ colourBrandingMain: getMainBrandingColourFromState(state),
453
+ headerType: getSiteSettingFromState(state, "HeaderType", getSiteSettingFromState(state, "UseGradientHeader", Config.env.hasGradientHeader) ? "gradient" : "white"),
454
+ headerPattern: getSiteSettingFromState(state, "HeaderPattern"),
455
+ patternColour: getSiteSettingFromState(state, "PatternColour")
456
+ };
457
+ };
458
+ export default connect(mapStateToProps, {})(Header);
459
+ //# sourceMappingURL=Header.js.map