@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,15 +1,16 @@
1
- import React, { Component } from 'react';
2
- import _ from 'lodash';
3
- import { TouchableOpacity, Text, View } from 'react-native';
4
- import { connect } from 'react-redux';
5
- import moment from 'moment';
6
- import { COLOUR_GREEN, TEXT_DARK, TEXT_LIGHT, getMainBrandingColourFromState, getLightBrandingColourFromState } from '../colours';
7
- import { Services } from '../config';
8
- import { ProfilePic } from './ProfilePic';
9
- import { InlineButton } from './InlineButton';
10
- import { Spinner } from './Spinner';
11
- import { followerActions } from '../apis';
12
- import { addFollower } from '../actions';
1
+ import React, { Component } from "react";
2
+ import _ from "lodash";
3
+ import { TouchableOpacity, View } from "react-native";
4
+ import { Text } from "./Text";
5
+ import { connect } from "react-redux";
6
+ import moment from "moment";
7
+ import { COLOUR_GREEN, TEXT_DARK, TEXT_LIGHT, getMainBrandingColourFromState, getLightBrandingColourFromState } from "../colours";
8
+ import { Services } from "../config";
9
+ import { ProfilePic } from "./ProfilePic";
10
+ import { InlineButton } from "./InlineButton";
11
+ import { Spinner } from "./Spinner";
12
+ import { followerActions } from "../apis";
13
+ import { addFollower } from "../actions";
13
14
  class UserListing extends Component {
14
15
  constructor(props) {
15
16
  super(props);
@@ -21,7 +22,7 @@ class UserListing extends Component {
21
22
  const {
22
23
  hidden
23
24
  } = this.props.me;
24
- if (hidden && _.includes(hidden, 'people')) return;
25
+ if (hidden && _.includes(hidden, "people")) return;
25
26
  if (this.props.onPress) {
26
27
  this.props.onPress();
27
28
  return;
@@ -35,7 +36,7 @@ class UserListing extends Component {
35
36
  if (_.isUndefined(user.id)) {
36
37
  user.id = user.userId;
37
38
  }
38
- Services.navigation.navigate('profile', {
39
+ Services.navigation.navigate("profile", {
39
40
  user
40
41
  });
41
42
  }
@@ -58,23 +59,23 @@ class UserListing extends Component {
58
59
  }
59
60
  getTimeText(input) {
60
61
  const gug = moment.unix(input);
61
- if (gug.isBefore(moment().local().startOf('d'))) {
62
- return gug.format('D MMM');
62
+ if (gug.isBefore(moment().local().startOf("d"))) {
63
+ return gug.format("D MMM");
63
64
  }
64
- return gug.format('h:mma');
65
+ return gug.format("h:mma");
65
66
  }
66
67
  getProfilePic() {
67
68
  if (this.props.user.profilePic == null) return null;
68
69
  let profilePic = this.props.user.profilePic;
69
70
  if (!_.isUndefined(this.props.user.profilePicThumb) && !_.isEmpty(this.props.user.profilePicThumb)) {
70
71
  profilePic = this.props.user.profilePicThumb;
71
- } else if (this.props.user.profilePic.indexOf('.amazonaws.com/1400/') > -1) {
72
- profilePic = profilePic.replace('/1400/', '/300/');
72
+ } else if (this.props.user.profilePic.indexOf(".amazonaws.com/1400/") > -1) {
73
+ profilePic = profilePic.replace("/1400/", "/300/");
73
74
  }
74
75
  return profilePic;
75
76
  }
76
77
  getLastMessage(chat) {
77
- if (typeof chat.lastMessage === 'string') {
78
+ if (typeof chat.lastMessage === "string") {
78
79
  return chat.lastMessage;
79
80
  }
80
81
  // TODO recognise user name of last message
@@ -84,16 +85,16 @@ class UserListing extends Component {
84
85
  if (this.props.user.privateChat) {
85
86
  return /*#__PURE__*/React.createElement(View, {
86
87
  style: {
87
- justifyContent: 'flex-start'
88
+ justifyContent: "flex-start"
88
89
  }
89
90
  }, /*#__PURE__*/React.createElement(Text, {
90
91
  style: [styles.chatTimeStamp, this.props.user.unread > 0 && {
91
92
  color: TEXT_DARK,
92
- fontFamily: 'sf-bold'
93
+ fontFamily: "sf-bold"
93
94
  }]
94
95
  }, this.getTimeText(this.props.user.Changed)), /*#__PURE__*/React.createElement(View, {
95
96
  style: [{
96
- flexDirection: 'row-reverse',
97
+ flexDirection: "row-reverse",
97
98
  marginTop: 2
98
99
  }, this.props.user.unread === 0 && {
99
100
  opacity: 0
@@ -192,27 +193,27 @@ const styles = {
192
193
  listItem: {
193
194
  paddingVertical: 8,
194
195
  paddingHorizontal: 16,
195
- justifyContent: 'flex-start',
196
- flexDirection: 'row',
197
- position: 'relative'
196
+ justifyContent: "flex-start",
197
+ flexDirection: "row",
198
+ position: "relative"
198
199
  },
199
200
  listItemTextContainer: {
200
201
  flex: 1,
201
- flexDirection: 'column',
202
- justifyContent: 'space-around',
202
+ flexDirection: "column",
203
+ justifyContent: "space-around",
203
204
  paddingLeft: 16
204
205
  },
205
206
  contactName: {
206
207
  fontSize: 15,
207
- fontFamily: 'sf-semibold',
208
- backgroundColor: 'rgba(255,255,255,0)',
208
+ fontFamily: "sf-semibold",
209
+ backgroundColor: "rgba(255,255,255,0)",
209
210
  color: TEXT_DARK
210
211
  },
211
212
  statusText: {
212
- position: 'absolute',
213
+ position: "absolute",
213
214
  top: 0,
214
215
  left: 82,
215
- fontFamily: 'sf-semibold',
216
+ fontFamily: "sf-semibold",
216
217
  fontSize: 12,
217
218
  color: TEXT_LIGHT
218
219
  },
@@ -220,10 +221,10 @@ const styles = {
220
221
  flex: 1
221
222
  },
222
223
  alignCenter: {
223
- alignItems: 'center'
224
+ alignItems: "center"
224
225
  },
225
226
  flexRowReverse: {
226
- flexDirection: 'row-reverse'
227
+ flexDirection: "row-reverse"
227
228
  },
228
229
  friendsButton: {
229
230
  width: 100
@@ -231,25 +232,25 @@ const styles = {
231
232
  counter: {
232
233
  borderRadius: 10,
233
234
  height: 20,
234
- justifyContent: 'center',
235
+ justifyContent: "center",
235
236
  minWidth: 20,
236
237
  paddingHorizontal: 4,
237
238
  backgroundColor: COLOUR_GREEN
238
239
  },
239
240
  counterText: {
240
- color: '#fff',
241
+ color: "#fff",
241
242
  fontSize: 12,
242
- fontFamily: 'sf-semibold',
243
- textAlign: 'center'
243
+ fontFamily: "sf-semibold",
244
+ textAlign: "center"
244
245
  },
245
246
  chatTimeStamp: {
246
247
  fontSize: 10,
247
- fontFamily: 'sf-semibold',
248
+ fontFamily: "sf-semibold",
248
249
  color: TEXT_LIGHT
249
250
  },
250
251
  chatLastMessage: {
251
252
  fontSize: 13,
252
- fontFamily: 'sf-medium',
253
+ fontFamily: "sf-medium",
253
254
  color: TEXT_LIGHT,
254
255
  marginRight: 5
255
256
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Component","_","TouchableOpacity","Text","View","connect","moment","COLOUR_GREEN","TEXT_DARK","TEXT_LIGHT","getMainBrandingColourFromState","getLightBrandingColourFromState","Services","ProfilePic","InlineButton","Spinner","followerActions","addFollower","UserListing","constructor","props","state","pending","onPress","hidden","me","includes","user","isUndefined","key","userId","id","navigation","navigate","onFollowUser","userToSave","profilePic","displayName","setState","myId","then","catch","getTimeText","input","gug","unix","isBefore","local","startOf","format","getProfilePic","profilePicThumb","isEmpty","indexOf","replace","getLastMessage","chat","lastMessage","text","renderFollowButton","privateChat","createElement","style","justifyContent","styles","chatTimeStamp","unread","color","fontFamily","Changed","flexDirection","marginTop","opacity","counter","counterText","showFriendsButton","isFollowing","colourBrandingLight","friendsButton","textStyle","colourBrandingMain","disabled","borderColor","borderWidth","noText","size","bind","renderStatusText","statusText","render","containerStyle","activeOpacity","onPressDisabled","listItem","listItemStyle","Diameter","fill","flexRowReverse","alignCenter","rightContent","listItemTextContainer","contactName","numberOfLines","chatLastMessage","subText","paddingVertical","paddingHorizontal","position","flex","paddingLeft","fontSize","backgroundColor","top","left","alignItems","width","borderRadius","height","minWidth","textAlign","marginRight","mapStateToProps"],"sources":["UserListing.js"],"sourcesContent":["import React, { Component } from 'react';\nimport _ from 'lodash';\nimport { TouchableOpacity, Text, View } from 'react-native';\nimport { connect } from 'react-redux';\nimport moment from 'moment';\nimport { COLOUR_GREEN, TEXT_DARK, TEXT_LIGHT, getMainBrandingColourFromState, getLightBrandingColourFromState } from '../colours';\nimport { Services } from '../config';\nimport { ProfilePic } from './ProfilePic';\nimport { InlineButton } from './InlineButton';\nimport { Spinner } from './Spinner';\nimport { followerActions } from '../apis';\nimport { addFollower } from '../actions';\n\nclass UserListing extends Component {\n constructor(props) {\n super(props);\n this.state = { pending: false };\n }\n\n onPress() {\n const { hidden } = this.props.me;\n if (hidden && _.includes(hidden, 'people')) return;\n\n if (this.props.onPress) {\n this.props.onPress();\n return;\n }\n const user = { ...this.props.user };\n if (_.isUndefined(user.key)) {\n user.key = user.userId;\n }\n if (_.isUndefined(user.id)) {\n user.id = user.userId;\n }\n Services.navigation.navigate('profile', { user });\n }\n\n onFollowUser() {\n const userToSave = {\n profilePic: this.props.user.profilePic,\n displayName: this.props.user.displayName,\n id: this.props.user.id,\n };\n this.setState({ pending: true });\n followerActions\n .addFollower(userToSave, this.props.myId)\n .then(() => {\n this.props.addFollower(userToSave);\n })\n .catch(() => {\n this.setState({ pending: false });\n });\n }\n\n getTimeText(input) {\n const gug = moment.unix(input);\n if (\n gug.isBefore(\n moment()\n .local()\n .startOf('d'),\n )\n ) {\n return gug.format('D MMM');\n }\n return gug.format('h:mma');\n }\n\n getProfilePic() {\n if (this.props.user.profilePic == null) return null;\n let profilePic = this.props.user.profilePic;\n if (!_.isUndefined(this.props.user.profilePicThumb) && !_.isEmpty(this.props.user.profilePicThumb)) {\n profilePic = this.props.user.profilePicThumb;\n } else if (this.props.user.profilePic.indexOf('.amazonaws.com/1400/') > -1) {\n profilePic = profilePic.replace('/1400/', '/300/');\n }\n return profilePic;\n }\n\n getLastMessage(chat) {\n if (typeof chat.lastMessage === 'string') {\n return chat.lastMessage;\n }\n // TODO recognise user name of last message\n return chat.lastMessage.text;\n }\n\n renderFollowButton() {\n if (this.props.user.privateChat) {\n return (\n <View style={{ justifyContent: 'flex-start' }}>\n <Text style={[styles.chatTimeStamp, this.props.user.unread > 0 && { color: TEXT_DARK, fontFamily: 'sf-bold' }]}>\n {this.getTimeText(this.props.user.Changed)}\n </Text>\n <View style={[{ flexDirection: 'row-reverse', marginTop: 2 }, this.props.user.unread === 0 && { opacity: 0 }]}>\n <View style={styles.counter}>\n <Text style={styles.counterText}>{this.props.user.unread}</Text>\n </View>\n </View>\n </View>\n );\n }\n\n if (!this.props.showFriendsButton) {\n return null;\n }\n\n // self\n if (this.props.myId === this.props.user.id) {\n return null;\n }\n\n // already following\n if (this.props.isFollowing) {\n return (\n <InlineButton\n color={this.props.colourBrandingLight}\n style={styles.friendsButton}\n textStyle={{ color: this.props.colourBrandingMain }}\n disabled\n >\n Friends\n </InlineButton>\n );\n }\n\n // in process of following\n if (this.state.pending) {\n return (\n <InlineButton style={[styles.friendsButton, { borderColor: this.props.colourBrandingMain, borderWidth: 1 }]} disabled noText>\n <Spinner size=\"small\" color={this.props.colourBrandingMain} />\n </InlineButton>\n );\n }\n\n // not following yet\n return (\n <InlineButton\n onPress={this.onFollowUser.bind(this)}\n color=\"#fff\"\n style={[styles.friendsButton, { borderColor: this.props.colourBrandingMain, borderWidth: 1 }]}\n textStyle={{ color: this.props.colourBrandingMain }}\n >\n Add friend\n </InlineButton>\n );\n }\n\n renderStatusText() {\n if (!this.props.statusText) {\n return null;\n }\n return <Text style={styles.statusText}>{this.props.statusText}</Text>;\n }\n\n render() {\n return (\n <View style={this.props.containerStyle}>\n <TouchableOpacity activeOpacity={0.9} onPress={this.onPress.bind(this)} disabled={this.props.onPressDisabled}>\n <View style={[styles.listItem, this.props.listItemStyle]}>\n {this.renderStatusText()}\n <ProfilePic ProfilePic={this.getProfilePic()} Diameter={42} />\n <View style={[styles.fill, styles.flexRowReverse, styles.alignCenter]}>\n {this.props.rightContent}\n {this.renderFollowButton()}\n <View style={styles.fill}>\n <View style={styles.listItemTextContainer}>\n <Text style={styles.contactName} numberOfLines={1}>\n {this.props.user.displayName}\n </Text>\n {this.props.user.privateChat && (\n <Text style={styles.chatLastMessage} numberOfLines={1}>\n {this.getLastMessage(this.props.user)}\n </Text>\n )}\n {this.props.subText}\n </View>\n </View>\n </View>\n </View>\n </TouchableOpacity>\n </View>\n );\n }\n}\n\nconst styles = {\n listItem: {\n paddingVertical: 8,\n paddingHorizontal: 16,\n justifyContent: 'flex-start',\n flexDirection: 'row',\n position: 'relative',\n },\n listItemTextContainer: {\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'space-around',\n paddingLeft: 16,\n },\n contactName: {\n fontSize: 15,\n fontFamily: 'sf-semibold',\n backgroundColor: 'rgba(255,255,255,0)',\n color: TEXT_DARK,\n },\n statusText: {\n position: 'absolute',\n top: 0,\n left: 82,\n fontFamily: 'sf-semibold',\n fontSize: 12,\n color: TEXT_LIGHT,\n },\n fill: {\n flex: 1,\n },\n alignCenter: {\n alignItems: 'center',\n },\n flexRowReverse: {\n flexDirection: 'row-reverse',\n },\n friendsButton: {\n width: 100,\n },\n counter: {\n borderRadius: 10,\n height: 20,\n justifyContent: 'center',\n minWidth: 20,\n paddingHorizontal: 4,\n backgroundColor: COLOUR_GREEN,\n },\n counterText: {\n color: '#fff',\n fontSize: 12,\n fontFamily: 'sf-semibold',\n textAlign: 'center',\n },\n chatTimeStamp: {\n fontSize: 10,\n fontFamily: 'sf-semibold',\n color: TEXT_LIGHT,\n },\n chatLastMessage: {\n fontSize: 13,\n fontFamily: 'sf-medium',\n color: TEXT_LIGHT,\n marginRight: 5,\n },\n};\n\nconst mapStateToProps = state => {\n return {\n me: state.user,\n colourBrandingMain: getMainBrandingColourFromState(state),\n colourBrandingLight: getLightBrandingColourFromState(state),\n };\n};\n\nexport default connect(mapStateToProps, { addFollower })(UserListing);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,gBAAgB,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,OAAO,QA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W,KAAK,CAAC;IACzDwD,mBAAmB,EAAElE,+BAA+B,CAACU,KAAK;EAC5D,CAAC;AACH,CAAC;AAED,eAAehB,OAAO,CAACoH,eAAe,EAAE;EAAExG;AAAY,CAAC,CAAC,CAACC,WAAW,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Component","_","TouchableOpacity","View","Text","connect","moment","COLOUR_GREEN","TEXT_DARK","TEXT_LIGHT","getMainBrandingColourFromState","getLightBrandingColourFromState","Services","ProfilePic","InlineButton","Spinner","followerActions","addFollower","UserListing","constructor","props","state","pending","onPress","hidden","me","includes","user","isUndefined","key","userId","id","navigation","navigate","onFollowUser","userToSave","profilePic","displayName","setState","myId","then","catch","getTimeText","input","gug","unix","isBefore","local","startOf","format","getProfilePic","profilePicThumb","isEmpty","indexOf","replace","getLastMessage","chat","lastMessage","text","renderFollowButton","privateChat","createElement","style","justifyContent","styles","chatTimeStamp","unread","color","fontFamily","Changed","flexDirection","marginTop","opacity","counter","counterText","showFriendsButton","isFollowing","colourBrandingLight","friendsButton","textStyle","colourBrandingMain","disabled","borderColor","borderWidth","noText","size","bind","renderStatusText","statusText","render","containerStyle","activeOpacity","onPressDisabled","listItem","listItemStyle","Diameter","fill","flexRowReverse","alignCenter","rightContent","listItemTextContainer","contactName","numberOfLines","chatLastMessage","subText","paddingVertical","paddingHorizontal","position","flex","paddingLeft","fontSize","backgroundColor","top","left","alignItems","width","borderRadius","height","minWidth","textAlign","marginRight","mapStateToProps"],"sources":["UserListing.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport _ from \"lodash\";\nimport { TouchableOpacity, View } from \"react-native\";\nimport { Text } from \"./Text\";\nimport { connect } from \"react-redux\";\nimport moment from \"moment\";\nimport {\n\tCOLOUR_GREEN,\n\tTEXT_DARK,\n\tTEXT_LIGHT,\n\tgetMainBrandingColourFromState,\n\tgetLightBrandingColourFromState,\n} from \"../colours\";\nimport { Services } from \"../config\";\nimport { ProfilePic } from \"./ProfilePic\";\nimport { InlineButton } from \"./InlineButton\";\nimport { Spinner } from \"./Spinner\";\nimport { followerActions } from \"../apis\";\nimport { addFollower } from \"../actions\";\n\nclass UserListing extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = { pending: false };\n\t}\n\n\tonPress() {\n\t\tconst { hidden } = this.props.me;\n\t\tif (hidden && _.includes(hidden, \"people\")) return;\n\n\t\tif (this.props.onPress) {\n\t\t\tthis.props.onPress();\n\t\t\treturn;\n\t\t}\n\t\tconst user = { ...this.props.user };\n\t\tif (_.isUndefined(user.key)) {\n\t\t\tuser.key = user.userId;\n\t\t}\n\t\tif (_.isUndefined(user.id)) {\n\t\t\tuser.id = user.userId;\n\t\t}\n\t\tServices.navigation.navigate(\"profile\", { user });\n\t}\n\n\tonFollowUser() {\n\t\tconst userToSave = {\n\t\t\tprofilePic: this.props.user.profilePic,\n\t\t\tdisplayName: this.props.user.displayName,\n\t\t\tid: this.props.user.id,\n\t\t};\n\t\tthis.setState({ pending: true });\n\t\tfollowerActions\n\t\t\t.addFollower(userToSave, this.props.myId)\n\t\t\t.then(() => {\n\t\t\t\tthis.props.addFollower(userToSave);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tthis.setState({ pending: false });\n\t\t\t});\n\t}\n\n\tgetTimeText(input) {\n\t\tconst gug = moment.unix(input);\n\t\tif (gug.isBefore(moment().local().startOf(\"d\"))) {\n\t\t\treturn gug.format(\"D MMM\");\n\t\t}\n\t\treturn gug.format(\"h:mma\");\n\t}\n\n\tgetProfilePic() {\n\t\tif (this.props.user.profilePic == null) return null;\n\t\tlet profilePic = this.props.user.profilePic;\n\t\tif (\n\t\t\t!_.isUndefined(this.props.user.profilePicThumb) &&\n\t\t\t!_.isEmpty(this.props.user.profilePicThumb)\n\t\t) {\n\t\t\tprofilePic = this.props.user.profilePicThumb;\n\t\t} else if (\n\t\t\tthis.props.user.profilePic.indexOf(\".amazonaws.com/1400/\") > -1\n\t\t) {\n\t\t\tprofilePic = profilePic.replace(\"/1400/\", \"/300/\");\n\t\t}\n\t\treturn profilePic;\n\t}\n\n\tgetLastMessage(chat) {\n\t\tif (typeof chat.lastMessage === \"string\") {\n\t\t\treturn chat.lastMessage;\n\t\t}\n\t\t// TODO recognise user name of last message\n\t\treturn chat.lastMessage.text;\n\t}\n\n\trenderFollowButton() {\n\t\tif (this.props.user.privateChat) {\n\t\t\treturn (\n\t\t\t\t<View style={{ justifyContent: \"flex-start\" }}>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\tstyles.chatTimeStamp,\n\t\t\t\t\t\t\tthis.props.user.unread > 0 && {\n\t\t\t\t\t\t\t\tcolor: TEXT_DARK,\n\t\t\t\t\t\t\t\tfontFamily: \"sf-bold\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.getTimeText(this.props.user.Changed)}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t{ flexDirection: \"row-reverse\", marginTop: 2 },\n\t\t\t\t\t\t\tthis.props.user.unread === 0 && { opacity: 0 },\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t\t<View style={styles.counter}>\n\t\t\t\t\t\t\t<Text style={styles.counterText}>{this.props.user.unread}</Text>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t</View>\n\t\t\t);\n\t\t}\n\n\t\tif (!this.props.showFriendsButton) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// self\n\t\tif (this.props.myId === this.props.user.id) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// already following\n\t\tif (this.props.isFollowing) {\n\t\t\treturn (\n\t\t\t\t<InlineButton\n\t\t\t\t\tcolor={this.props.colourBrandingLight}\n\t\t\t\t\tstyle={styles.friendsButton}\n\t\t\t\t\ttextStyle={{ color: this.props.colourBrandingMain }}\n\t\t\t\t\tdisabled\n\t\t\t\t>\n\t\t\t\t\tFriends\n\t\t\t\t</InlineButton>\n\t\t\t);\n\t\t}\n\n\t\t// in process of following\n\t\tif (this.state.pending) {\n\t\t\treturn (\n\t\t\t\t<InlineButton\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\tstyles.friendsButton,\n\t\t\t\t\t\t{ borderColor: this.props.colourBrandingMain, borderWidth: 1 },\n\t\t\t\t\t]}\n\t\t\t\t\tdisabled\n\t\t\t\t\tnoText\n\t\t\t\t>\n\t\t\t\t\t<Spinner size=\"small\" color={this.props.colourBrandingMain} />\n\t\t\t\t</InlineButton>\n\t\t\t);\n\t\t}\n\n\t\t// not following yet\n\t\treturn (\n\t\t\t<InlineButton\n\t\t\t\tonPress={this.onFollowUser.bind(this)}\n\t\t\t\tcolor=\"#fff\"\n\t\t\t\tstyle={[\n\t\t\t\t\tstyles.friendsButton,\n\t\t\t\t\t{ borderColor: this.props.colourBrandingMain, borderWidth: 1 },\n\t\t\t\t]}\n\t\t\t\ttextStyle={{ color: this.props.colourBrandingMain }}\n\t\t\t>\n\t\t\t\tAdd friend\n\t\t\t</InlineButton>\n\t\t);\n\t}\n\n\trenderStatusText() {\n\t\tif (!this.props.statusText) {\n\t\t\treturn null;\n\t\t}\n\t\treturn <Text style={styles.statusText}>{this.props.statusText}</Text>;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<View style={this.props.containerStyle}>\n\t\t\t\t<TouchableOpacity\n\t\t\t\t\tactiveOpacity={0.9}\n\t\t\t\t\tonPress={this.onPress.bind(this)}\n\t\t\t\t\tdisabled={this.props.onPressDisabled}\n\t\t\t\t>\n\t\t\t\t\t<View style={[styles.listItem, this.props.listItemStyle]}>\n\t\t\t\t\t\t{this.renderStatusText()}\n\t\t\t\t\t\t<ProfilePic ProfilePic={this.getProfilePic()} Diameter={42} />\n\t\t\t\t\t\t<View\n\t\t\t\t\t\t\tstyle={[styles.fill, styles.flexRowReverse, styles.alignCenter]}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.props.rightContent}\n\t\t\t\t\t\t\t{this.renderFollowButton()}\n\t\t\t\t\t\t\t<View style={styles.fill}>\n\t\t\t\t\t\t\t\t<View style={styles.listItemTextContainer}>\n\t\t\t\t\t\t\t\t\t<Text style={styles.contactName} numberOfLines={1}>\n\t\t\t\t\t\t\t\t\t\t{this.props.user.displayName}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t{this.props.user.privateChat && (\n\t\t\t\t\t\t\t\t\t\t<Text style={styles.chatLastMessage} numberOfLines={1}>\n\t\t\t\t\t\t\t\t\t\t\t{this.getLastMessage(this.props.user)}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{this.props.subText}\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t</TouchableOpacity>\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tlistItem: {\n\t\tpaddingVertical: 8,\n\t\tpaddingHorizontal: 16,\n\t\tjustifyContent: \"flex-start\",\n\t\tflexDirection: \"row\",\n\t\tposition: \"relative\",\n\t},\n\tlistItemTextContainer: {\n\t\tflex: 1,\n\t\tflexDirection: \"column\",\n\t\tjustifyContent: \"space-around\",\n\t\tpaddingLeft: 16,\n\t},\n\tcontactName: {\n\t\tfontSize: 15,\n\t\tfontFamily: \"sf-semibold\",\n\t\tbackgroundColor: \"rgba(255,255,255,0)\",\n\t\tcolor: TEXT_DARK,\n\t},\n\tstatusText: {\n\t\tposition: \"absolute\",\n\t\ttop: 0,\n\t\tleft: 82,\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 12,\n\t\tcolor: TEXT_LIGHT,\n\t},\n\tfill: {\n\t\tflex: 1,\n\t},\n\talignCenter: {\n\t\talignItems: \"center\",\n\t},\n\tflexRowReverse: {\n\t\tflexDirection: \"row-reverse\",\n\t},\n\tfriendsButton: {\n\t\twidth: 100,\n\t},\n\tcounter: {\n\t\tborderRadius: 10,\n\t\theight: 20,\n\t\tjustifyContent: \"center\",\n\t\tminWidth: 20,\n\t\tpaddingHorizontal: 4,\n\t\tbackgroundColor: COLOUR_GREEN,\n\t},\n\tcounterText: {\n\t\tcolor: \"#fff\",\n\t\tfontSize: 12,\n\t\tfontFamily: \"sf-semibold\",\n\t\ttextAlign: \"center\",\n\t},\n\tchatTimeStamp: {\n\t\tfontSize: 10,\n\t\tfontFamily: \"sf-semibold\",\n\t\tcolor: TEXT_LIGHT,\n\t},\n\tchatLastMessage: {\n\t\tfontSize: 13,\n\t\tfontFamily: \"sf-medium\",\n\t\tcolor: TEXT_LIGHT,\n\t\tmarginRight: 5,\n\t},\n};\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tme: state.user,\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t\tcolourBrandingLight: getLightBrandingColourFromState(state),\n\t};\n};\n\nexport default connect(mapStateToProps, { addFollower })(UserListing);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,OAAO,QAAQ,aAAa;AACrC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SACCC,YAAY,EACZC,SAAS,EACTC,UAAU,EACVC,8BAA8B,EAC9BC,+BAA+B,QACzB,YAAY;AACnB,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,eAAe,QAAQ,SAAS;AACzC,SAASC,WAAW,QAAQ,YAAY;AAExC,MAAMC,WAAW,SAASlB,SAAS,CAAC;EACnCmB,WAAWA,CAACC,KAAK,EAAE;IA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ACP,CAAC;EACDV,WAAW,EAAE;IACZgB,UAAU,EAAE;EACb,CAAC;EACDjB,cAAc,EAAE;IACf3B,aAAa,EAAE;EAChB,CAAC;EACDQ,aAAa,EAAE;IACdqC,KAAK,EAAE;EACR,CAAC;EACD1C,OAAO,EAAE;IACR2C,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVtD,cAAc,EAAE,QAAQ;IACxBuD,QAAQ,EAAE,EAAE;IACZZ,iBAAiB,EAAE,CAAC;IACpBK,eAAe,EAAExG;EAClB,CAAC;EACDmE,WAAW,EAAE;IACZP,KAAK,EAAE,MAAM;IACb2C,QAAQ,EAAE,EAAE;IACZ1C,UAAU,EAAE,aAAa;IACzBmD,SAAS,EAAE;EACZ,CAAC;EACDtD,aAAa,EAAE;IACd6C,QAAQ,EAAE,EAAE;IACZ1C,UAAU,EAAE,aAAa;IACzBD,KAAK,EAAE1D;EACR,CAAC;EACD8F,eAAe,EAAE;IAChBO,QAAQ,EAAE,EAAE;IACZ1C,UAAU,EAAE,WAAW;IACvBD,KAAK,EAAE1D,UAAU;IACjB+G,WAAW,EAAE;EACd;AACD,CAAC;AAED,MAAMC,eAAe,GAAIpG,KAAK,IAAK;EAClC,OAAO;IACNI,EAAE,EAAEJ,KAAK,CAACM,IAAI;IACdqD,kBAAkB,EAAEtE,8BAA8B,CAACW,KAAK,CAAC;IACzDwD,mBAAmB,EAAElE,+BAA+B,CAACU,KAAK;EAC3D,CAAC;AACF,CAAC;AAED,eAAehB,OAAO,CAACoH,eAAe,EAAE;EAAExG;AAAY,CAAC,CAAC,CAACC,WAAW,CAAC","ignoreList":[]}
@@ -1,19 +1,19 @@
1
1
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
- import React, { Component } from 'react';
5
- import { Platform, View, Modal, TouchableOpacity, StyleSheet } from 'react-native';
6
- import * as ScreenOrientation from 'expo-screen-orientation';
7
- import { StatusBarHeight, getCompressed, imageExists } from '../helper';
8
- import { Pl60Icon } from '../fonts';
9
- import { SharingTools } from './SharingTools';
10
- import MediaPlayer from './MediaPlayer';
4
+ import React, { Component } from "react";
5
+ import { Platform, View, Modal, TouchableOpacity, StyleSheet } from "react-native";
6
+ import * as ScreenOrientation from "expo-screen-orientation";
7
+ import { StatusBarHeight, getCompressed, imageExists } from "../helper";
8
+ import { FontAwesome } from "./Icon";
9
+ import { SharingTools } from "./SharingTools";
10
+ import MediaPlayer from "./MediaPlayer";
11
11
  class VideoPopup extends Component {
12
12
  constructor(props) {
13
13
  super(props);
14
14
  _defineProperty(this, "UNSAFE_componentWillMount", async () => {
15
15
  this.checkCompressed(this.props.uri);
16
- await ScreenOrientation.lockAsync(Platform.OS === 'ios' ? ScreenOrientation.OrientationLock.DEFAULT : ScreenOrientation.OrientationLock.ALL);
16
+ await ScreenOrientation.lockAsync(Platform.OS === "ios" ? ScreenOrientation.OrientationLock.DEFAULT : ScreenOrientation.OrientationLock.ALL);
17
17
  });
18
18
  _defineProperty(this, "componentWillUnmount", async () => {
19
19
  await ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT_UP);
@@ -27,7 +27,7 @@ class VideoPopup extends Component {
27
27
  });
28
28
  });
29
29
  this.state = {
30
- uri: '',
30
+ uri: "",
31
31
  isFullScreen: false
32
32
  };
33
33
  }
@@ -40,8 +40,8 @@ class VideoPopup extends Component {
40
40
  style: styles.menuIconContainer,
41
41
  onPress: this.props.onClose,
42
42
  activeOpacity: 0.6
43
- }, /*#__PURE__*/React.createElement(Pl60Icon, {
44
- name: "close",
43
+ }, /*#__PURE__*/React.createElement(FontAwesome, {
44
+ name: "x",
45
45
  style: styles.menuIcon
46
46
  }));
47
47
  }
@@ -73,10 +73,10 @@ class VideoPopup extends Component {
73
73
  } = this.props;
74
74
  return /*#__PURE__*/React.createElement(Modal, {
75
75
  visible: visible,
76
- animationType: animationType || 'fade',
76
+ animationType: animationType || "fade",
77
77
  onRequestClose: onClose,
78
78
  style: [styles.container, style],
79
- supportedOrientations: ['portrait', 'landscape']
79
+ supportedOrientations: ["portrait", "landscape"]
80
80
  }, this.renderPlayer(), !isFullScreen && this.renderClose(), !isFullScreen && /*#__PURE__*/React.createElement(SharingTools, {
81
81
  uri: this.props.uri
82
82
  }));
@@ -84,10 +84,10 @@ class VideoPopup extends Component {
84
84
  }
85
85
  const styles = StyleSheet.create({
86
86
  container: {
87
- backgroundColor: '#000'
87
+ backgroundColor: "#000"
88
88
  },
89
89
  menuIconContainer: {
90
- position: 'absolute',
90
+ position: "absolute",
91
91
  top: StatusBarHeight(0),
92
92
  right: 0,
93
93
  width: 55,
@@ -98,15 +98,15 @@ const styles = StyleSheet.create({
98
98
  fontSize: 25,
99
99
  padding: 15,
100
100
  width: 55,
101
- textAlign: 'center',
102
- color: '#fff',
101
+ textAlign: "center",
102
+ color: "#fff",
103
103
  zIndex: 3
104
104
  },
105
105
  playerContainer: {
106
106
  flex: 1,
107
- backgroundColor: '#000',
108
- alignItems: 'center',
109
- justifyContent: 'center'
107
+ backgroundColor: "#000",
108
+ alignItems: "center",
109
+ justifyContent: "center"
110
110
  }
111
111
  });
112
112
  export { VideoPopup };
@@ -1 +1 @@
1
- {"version":3,"names":["React","Component","Platform","View","Modal","TouchableOpacity","StyleSheet","ScreenOrientation","StatusBarHeight","getCompressed","imageExists","Pl60Icon","SharingTools","MediaPlayer","VideoPopup","constructor","props","_defineProperty","checkCompressed","uri","lockAsync","OS","OrientationLock","DEFAULT","ALL","PORTRAIT_UP","url","compressedUri","then","compressedExists","setState","state","isFullScreen","UNSAFE_componentWillReceiveProps","nextProps","renderClose","createElement","style","styles","menuIconContainer","onPress","onClose","activeOpacity","name","menuIcon","renderPlayer","playerContainer","source","useVideoPlayer","autoPlay","orientationChanged","render","visible","animationType","onRequestClose","container","supportedOrientations","create","backgroundColor","position","top","right","width","height","zIndex","fontSize","padding","textAlign","color","flex","alignItems","justifyContent"],"sources":["VideoPopup.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { Platform, View, Modal, TouchableOpacity, StyleSheet } from 'react-native';\nimport * as ScreenOrientation from 'expo-screen-orientation';\nimport { StatusBarHeight, getCompressed, imageExists } from '../helper';\nimport { Pl60Icon } from '../fonts';\nimport { SharingTools } from './SharingTools';\nimport MediaPlayer from './MediaPlayer';\n\nclass VideoPopup extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n uri: '',\n isFullScreen: false,\n };\n }\n\n UNSAFE_componentWillMount = async () => {\n this.checkCompressed(this.props.uri);\n await ScreenOrientation.lockAsync(\n Platform.OS === 'ios' ? ScreenOrientation.OrientationLock.DEFAULT : ScreenOrientation.OrientationLock.ALL,\n );\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.props.uri === nextProps.uri) return;\n this.checkCompressed(nextProps.uri);\n }\n\n componentWillUnmount = async () => {\n await ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT_UP);\n };\n\n checkCompressed = url => {\n const compressedUri = getCompressed(url);\n imageExists(compressedUri).then(compressedExists => {\n this.setState({ uri: compressedExists ? compressedUri : url });\n });\n };\n\n renderClose() {\n return (\n <TouchableOpacity style={styles.menuIconContainer} onPress={this.props.onClose} activeOpacity={0.6}>\n <Pl60Icon name=\"close\" style={styles.menuIcon} />\n </TouchableOpacity>\n );\n }\n\n renderPlayer() {\n const { uri } = this.state;\n if (!uri) return null;\n\n return (\n <View style={styles.playerContainer}>\n <MediaPlayer\n source={uri}\n useVideoPlayer={true}\n autoPlay={true}\n orientationChanged={isFullScreen => this.setState({ isFullScreen })}\n />\n </View>\n );\n }\n\n render() {\n const { isFullScreen } = this.state;\n const { visible, onClose, animationType, style } = this.props;\n\n return (\n <Modal\n visible={visible}\n animationType={animationType || 'fade'}\n onRequestClose={onClose}\n style={[styles.container, style]}\n supportedOrientations={['portrait', 'landscape']}\n >\n {this.renderPlayer()}\n {!isFullScreen && this.renderClose()}\n {!isFullScreen && <SharingTools uri={this.props.uri} />}\n </Modal>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: '#000',\n },\n menuIconContainer: {\n position: 'absolute',\n top: StatusBarHeight(0),\n right: 0,\n width: 55,\n height: 55,\n zIndex: 3,\n },\n menuIcon: {\n fontSize: 25,\n padding: 15,\n width: 55,\n textAlign: 'center',\n color: '#fff',\n zIndex: 3,\n },\n playerContainer: {\n flex: 1,\n backgroundColor: '#000',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport { VideoPopup };\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,QAAQ,EAAEC,IAAI,EAAEC,KAAK,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAClF,OAAO,KAAKC,iBAAiB,MAAM,yBAAyB;AAC5D,SAASC,eAAe,EAAEC,aAAa,EAAEC,WAAW,QAAQ,WAAW;AACvE,SAASC,QAAQ,QAAQ,UAAU;AACnC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,OAAOC,WAAW,MAAM,eAAe;AAEvC,MAAMC,UAAU,SAASb,SAAS,CAAC;EACjCc,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,oCAQa,YAAY;MACtC,IAAI,CAACC,eAAe,CAAC,IAAI,CAACF,KAAK,CAACG,GAAG,CAAC;MACpC,MAAMZ,iBAAiB,CAACa,SAAS,CAC/BlB,QAAQ,CAACmB,EAAE,KAAK,KAAK,GAAGd,iBAAiB,CAACe,eAAe,CAACC,O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;EACV,CAAC;EACDpB,QAAQ,EAAE;IACRqB,QAAQ,EAAE,EAAE;IACZC,OAAO,EAAE,EAAE;IACXJ,KAAK,EAAE,EAAE;IACTK,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE,MAAM;IACbJ,MAAM,EAAE;EACV,CAAC;EACDlB,eAAe,EAAE;IACfuB,IAAI,EAAE,CAAC;IACPX,eAAe,EAAE,MAAM;IACvBY,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,SAASzD,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["React","Component","Platform","View","Modal","TouchableOpacity","StyleSheet","ScreenOrientation","StatusBarHeight","getCompressed","imageExists","FontAwesome","SharingTools","MediaPlayer","VideoPopup","constructor","props","_defineProperty","checkCompressed","uri","lockAsync","OS","OrientationLock","DEFAULT","ALL","PORTRAIT_UP","url","compressedUri","then","compressedExists","setState","state","isFullScreen","UNSAFE_componentWillReceiveProps","nextProps","renderClose","createElement","style","styles","menuIconContainer","onPress","onClose","activeOpacity","name","menuIcon","renderPlayer","playerContainer","source","useVideoPlayer","autoPlay","orientationChanged","render","visible","animationType","onRequestClose","container","supportedOrientations","create","backgroundColor","position","top","right","width","height","zIndex","fontSize","padding","textAlign","color","flex","alignItems","justifyContent"],"sources":["VideoPopup.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport {\n\tPlatform,\n\tView,\n\tModal,\n\tTouchableOpacity,\n\tStyleSheet,\n} from \"react-native\";\nimport * as ScreenOrientation from \"expo-screen-orientation\";\nimport { StatusBarHeight, getCompressed, imageExists } from \"../helper\";\nimport { FontAwesome } from \"./Icon\";\nimport { SharingTools } from \"./SharingTools\";\nimport MediaPlayer from \"./MediaPlayer\";\n\nclass VideoPopup extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\turi: \"\",\n\t\t\tisFullScreen: false,\n\t\t};\n\t}\n\n\tUNSAFE_componentWillMount = async () => {\n\t\tthis.checkCompressed(this.props.uri);\n\t\tawait ScreenOrientation.lockAsync(\n\t\t\tPlatform.OS === \"ios\"\n\t\t\t\t? ScreenOrientation.OrientationLock.DEFAULT\n\t\t\t\t: ScreenOrientation.OrientationLock.ALL,\n\t\t);\n\t};\n\n\tUNSAFE_componentWillReceiveProps(nextProps) {\n\t\tif (this.props.uri === nextProps.uri) return;\n\t\tthis.checkCompressed(nextProps.uri);\n\t}\n\n\tcomponentWillUnmount = async () => {\n\t\tawait ScreenOrientation.lockAsync(\n\t\t\tScreenOrientation.OrientationLock.PORTRAIT_UP,\n\t\t);\n\t};\n\n\tcheckCompressed = (url) => {\n\t\tconst compressedUri = getCompressed(url);\n\t\timageExists(compressedUri).then((compressedExists) => {\n\t\t\tthis.setState({ uri: compressedExists ? compressedUri : url });\n\t\t});\n\t};\n\n\trenderClose() {\n\t\treturn (\n\t\t\t<TouchableOpacity\n\t\t\t\tstyle={styles.menuIconContainer}\n\t\t\t\tonPress={this.props.onClose}\n\t\t\t\tactiveOpacity={0.6}\n\t\t\t>\n\t\t\t\t<FontAwesome name=\"x\" style={styles.menuIcon} />\n\t\t\t</TouchableOpacity>\n\t\t);\n\t}\n\n\trenderPlayer() {\n\t\tconst { uri } = this.state;\n\t\tif (!uri) return null;\n\n\t\treturn (\n\t\t\t<View style={styles.playerContainer}>\n\t\t\t\t<MediaPlayer\n\t\t\t\t\tsource={uri}\n\t\t\t\t\tuseVideoPlayer={true}\n\t\t\t\t\tautoPlay={true}\n\t\t\t\t\torientationChanged={(isFullScreen) => this.setState({ isFullScreen })}\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst { isFullScreen } = this.state;\n\t\tconst { visible, onClose, animationType, style } = this.props;\n\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tvisible={visible}\n\t\t\t\tanimationType={animationType || \"fade\"}\n\t\t\t\tonRequestClose={onClose}\n\t\t\t\tstyle={[styles.container, style]}\n\t\t\t\tsupportedOrientations={[\"portrait\", \"landscape\"]}\n\t\t\t>\n\t\t\t\t{this.renderPlayer()}\n\t\t\t\t{!isFullScreen && this.renderClose()}\n\t\t\t\t{!isFullScreen && <SharingTools uri={this.props.uri} />}\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nconst styles = StyleSheet.create({\n\tcontainer: {\n\t\tbackgroundColor: \"#000\",\n\t},\n\tmenuIconContainer: {\n\t\tposition: \"absolute\",\n\t\ttop: StatusBarHeight(0),\n\t\tright: 0,\n\t\twidth: 55,\n\t\theight: 55,\n\t\tzIndex: 3,\n\t},\n\tmenuIcon: {\n\t\tfontSize: 25,\n\t\tpadding: 15,\n\t\twidth: 55,\n\t\ttextAlign: \"center\",\n\t\tcolor: \"#fff\",\n\t\tzIndex: 3,\n\t},\n\tplayerContainer: {\n\t\tflex: 1,\n\t\tbackgroundColor: \"#000\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t},\n});\n\nexport { VideoPopup };\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SACCC,QAAQ,EACRC,IAAI,EACJC,KAAK,EACLC,gBAAgB,EAChBC,UAAU,QACJ,cAAc;AACrB,OAAO,KAAKC,iBAAiB,MAAM,yBAAyB;AAC5D,SAASC,eAAe,EAAEC,aAAa,EAAEC,WAAW,QAAQ,WAAW;AACvE,SAASC,WAAW,QAAQ,QAAQ;AACpC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,OAAOC,WAAW,MAAM,eAAe;AAEvC,MAAMC,UAAU,SAASb,SAAS,CAAC;EAClCc,WAAWA,CAACC,KAAK,EAAE;IAClB,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,oCAQc,YAAY;MACvC,IAAI,CAACC,eAAe,CAAC,IAAI,CAACF,KAAK,CAACG,GAAG,CAAC;MACpC,MAAMZ,iBAAiB,CAACa,SAAS,CAChClB,QAAQ,CAACmB,EAAE,KAAK,KAAK,GAClBd,iBAAiB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AAE;IACVC,MAAM,EAAE;EACT,CAAC;EACDpB,QAAQ,EAAE;IACTqB,QAAQ,EAAE,EAAE;IACZC,OAAO,EAAE,EAAE;IACXJ,KAAK,EAAE,EAAE;IACTK,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE,MAAM;IACbJ,MAAM,EAAE;EACT,CAAC;EACDlB,eAAe,EAAE;IAChBuB,IAAI,EAAE,CAAC;IACPX,eAAe,EAAE,MAAM;IACvBY,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EACjB;AACD,CAAC,CAAC;AAEF,SAASzD,UAAU","ignoreList":[]}
@@ -1,12 +1,13 @@
1
- import React, { PureComponent } from 'react';
2
- import _ from 'lodash';
3
- import { View, Text, Dimensions } from 'react-native';
4
- import { connect } from 'react-redux';
5
- import { Pl60Icon } from '../fonts';
6
- import { COLOUR_GREEN, TEXT_DARK, getMainBrandingColourFromState } from '../colours';
7
- import { MiddlePopup } from './MiddlePopup';
8
- import { InlineButton } from './InlineButton';
9
- const SCREEN_WIDTH = Dimensions.get('window').width;
1
+ import React, { PureComponent } from "react";
2
+ import _ from "lodash";
3
+ import { View, Dimensions } from "react-native";
4
+ import { Text } from "./Text";
5
+ import { connect } from "react-redux";
6
+ import { FontAwesome } from "./Icon";
7
+ import { COLOUR_GREEN, TEXT_DARK, getMainBrandingColourFromState } from "../colours";
8
+ import { MiddlePopup } from "./MiddlePopup";
9
+ import { InlineButton } from "./InlineButton";
10
+ const SCREEN_WIDTH = Dimensions.get("window").width;
10
11
  class WarningPopup extends PureComponent {
11
12
  render() {
12
13
  return /*#__PURE__*/React.createElement(MiddlePopup, {
@@ -15,9 +16,9 @@ class WarningPopup extends PureComponent {
15
16
  style: [styles.popup, this.props.padHorizontal && {
16
17
  paddingHorizontal: 16
17
18
  }]
18
- }, this.props.isSuccess && /*#__PURE__*/React.createElement(Pl60Icon, {
19
+ }, this.props.isSuccess && /*#__PURE__*/React.createElement(FontAwesome, {
19
20
  style: styles.icon,
20
- name: "circleoutlined"
21
+ name: "circle-check"
21
22
  }), /*#__PURE__*/React.createElement(Text, {
22
23
  style: styles.text
23
24
  }, this.props.confirmText), /*#__PURE__*/React.createElement(View, {
@@ -29,18 +30,18 @@ class WarningPopup extends PureComponent {
29
30
  style: [styles.infoText, this.props.infoTextStyle]
30
31
  }, this.props.infoText)), /*#__PURE__*/React.createElement(InlineButton, {
31
32
  onPress: this.props.onClose,
32
- color: this.props.ctaButton ? this.props.colourBrandingMain : '#fff',
33
+ color: this.props.ctaButton ? this.props.colourBrandingMain : "#fff",
33
34
  style: styles.button,
34
35
  textStyle: [styles.closeText, {
35
- color: this.props.ctaButton ? '#fff' : this.props.colourBrandingMain
36
+ color: this.props.ctaButton ? "#fff" : this.props.colourBrandingMain
36
37
  }],
37
38
  large: true
38
- }, !_.isUndefined(this.props.buttonText) ? this.props.buttonText : 'Close'));
39
+ }, !_.isUndefined(this.props.buttonText) ? this.props.buttonText : "Close"));
39
40
  }
40
41
  }
41
42
  const styles = {
42
43
  popup: {
43
- width: 'auto',
44
+ width: "auto",
44
45
  maxWidth: SCREEN_WIDTH - 34,
45
46
  paddingVertical: 16
46
47
  },
@@ -51,26 +52,26 @@ const styles = {
51
52
  color: COLOUR_GREEN
52
53
  },
53
54
  text: {
54
- fontFamily: 'sf-bold',
55
+ fontFamily: "sf-bold",
55
56
  fontSize: 24,
56
57
  lineHeight: 24,
57
58
  color: TEXT_DARK,
58
- textAlign: 'center',
59
+ textAlign: "center",
59
60
  marginTop: 8
60
61
  },
61
62
  infoText: {
62
- fontFamily: 'sf-regular',
63
+ fontFamily: "sf-regular",
63
64
  fontSize: 16,
64
65
  lineHeight: 22,
65
66
  color: TEXT_DARK,
66
- textAlign: 'left'
67
+ textAlign: "left"
67
68
  },
68
69
  button: {
69
70
  width: 130,
70
71
  marginTop: 20
71
72
  },
72
73
  closeText: {
73
- fontFamily: 'sf-medium',
74
+ fontFamily: "sf-medium",
74
75
  fontSize: 15
75
76
  }
76
77
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","PureComponent","_","View","Text","Dimensions","connect","Pl60Icon","COLOUR_GREEN","TEXT_DARK","getMainBrandingColourFromState","MiddlePopup","InlineButton","SCREEN_WIDTH","get","width","WarningPopup","render","createElement","visible","props","onClose","style","styles","popup","padHorizontal","paddingHorizontal","isSuccess","icon","name","text","confirmText","marginTop","infoText","infoTextStyle","onPress","color","ctaButton","colourBrandingMain","button","textStyle","closeText","large","isUndefined","buttonText","maxWidth","paddingVertical","paddingBottom","fontSize","fontFamily","lineHeight","textAlign","mapStateToProps","state","warningPopup"],"sources":["WarningPopup.js"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport _ from 'lodash';\nimport { View, Text, Dimensions } from 'react-native';\nimport { connect } from 'react-redux';\nimport { Pl60Icon } from '../fonts';\nimport { COLOUR_GREEN, TEXT_DARK, getMainBrandingColourFromState } from '../colours';\nimport { MiddlePopup } from './MiddlePopup';\nimport { InlineButton } from './InlineButton';\n\nconst SCREEN_WIDTH = Dimensions.get('window').width;\n\nclass WarningPopup extends PureComponent {\n render() {\n return (\n <MiddlePopup\n visible={this.props.visible}\n onClose={this.props.onClose}\n style={[styles.popup, this.props.padHorizontal && { paddingHorizontal: 16 }]}\n >\n {this.props.isSuccess && <Pl60Icon style={styles.icon} name=\"circleoutlined\" />}\n <Text style={styles.text}>{this.props.confirmText}</Text>\n <View style={{ marginTop: 16, paddingHorizontal: 24 }}>\n <Text style={[styles.infoText, this.props.infoTextStyle]}>{this.props.infoText}</Text>\n </View>\n <InlineButton\n onPress={this.props.onClose}\n color={this.props.ctaButton ? this.props.colourBrandingMain : '#fff'}\n style={styles.button}\n textStyle={[styles.closeText, { color: this.props.ctaButton ? '#fff' : this.props.colourBrandingMain }]}\n large\n >\n {!_.isUndefined(this.props.buttonText) ? this.props.buttonText : 'Close'}\n </InlineButton>\n </MiddlePopup>\n );\n }\n}\n\nconst styles = {\n popup: {\n width: 'auto',\n maxWidth: SCREEN_WIDTH - 34,\n paddingVertical: 16,\n },\n icon: {\n marginTop: 20,\n paddingBottom: 16,\n fontSize: 52,\n color: COLOUR_GREEN,\n },\n text: {\n fontFamily: 'sf-bold',\n fontSize: 24,\n lineHeight: 24,\n color: TEXT_DARK,\n textAlign: 'center',\n marginTop: 8,\n },\n infoText: {\n fontFamily: 'sf-regular',\n fontSize: 16,\n lineHeight: 22,\n color: TEXT_DARK,\n textAlign: 'left',\n },\n button: {\n width: 130,\n marginTop: 20,\n },\n closeText: {\n fontFamily: 'sf-medium',\n fontSize: 15,\n },\n};\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: getMainBrandingColourFromState(state),\n };\n};\n\nconst warningPopup = connect(mapStateToProps, {})(WarningPopup);\nexport { warningPopup as WarningPopup };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,QAAQ,QAAQ,UAAU;AACnC,SAASC,YAAY,EAAEC,SAAS,EAAEC,8BAA8B,QAAQ,YAAY;AACpF,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,QAAQ,gBAAgB;AAE7C,MAAMC,YAAY,GAAGR,UAAU,CAACS,GAAG,CAAC,QAAQ,CAAC,CAACC,KAAK;AAEnD,MAAMC,YAAY,SAASf,aAAa,CAAC;EACvCgB,MAAMA,CAAA,EAAG;IACP,oBACEjB,KAAA,CAAAkB,aAAA,CAACP,WAAW;MACVQ,OAAO,EAAE,IAAI,CAACC,KAAK,CAACD,OAAQ;MAC5BE,OAAO,EAAE,IAAI,CAACD,KAAK,CAACC,OAAQ;MAC5BC,KAAK,EAAE,CAACC,MAAM,CAACC,KAAK,EAAE,IAAI,CAACJ,KAAK,CAACK,aAAa,IAAI;QAAEC,iBAAiB,EAAE;MAAG,CAAC;IAAE,GAE5E,IAAI,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,GAAG,EAAE;IAC3BiC,eAAe,EAAE;EACnB,CAAC;EACDlB,IAAI,EAAE;IACJI,SAAS,EAAE,EAAE;IACbe,aAAa,EAAE,EAAE;IACjBC,QAAQ,EAAE,EAAE;IACZZ,KAAK,EAAE5B;EACT,CAAC;EACDsB,IAAI,EAAE;IACJmB,UAAU,EAAE,SAAS;IACrBD,QAAQ,EAAE,EAAE;IACZE,UAAU,EAAE,EAAE;IACdd,KAAK,EAAE3B,SAAS;IAChB0C,SAAS,EAAE,QAAQ;IACnBnB,SAAS,EAAE;EACb,CAAC;EACDC,QAAQ,EAAE;IACRgB,UAAU,EAAE,YAAY;IACxBD,QAAQ,EAAE,EAAE;IACZE,UAAU,EAAE,EAAE;IACdd,KAAK,EAAE3B,SAAS;IAChB0C,SAAS,EAAE;EACb,CAAC;EACDZ,MAAM,EAAE;IACNxB,KAAK,EAAE,GAAG;IACViB,SAAS,EAAE;EACb,CAAC;EACDS,SAAS,EAAE;IACTQ,UAAU,EAAE,WAAW;IACvBD,QAAQ,EAAE;EACZ;AACF,CAAC;AAED,MAAMI,eAAe,GAAGC,KAAK,IAAI;EAC/B,OAAO;IACLf,kBAAkB,EAAE5B,8BAA8B,CAAC2C,KAAK;EAC1D,CAAC;AACH,CAAC;AAED,MAAMC,YAAY,GAAGhD,OAAO,CAAC8C,eAAe,EAAE,CAAC,CAAC,CAAC,CAACpC,YAAY,CAAC;AAC/D,SAASsC,YAAY,IAAItC,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["React","PureComponent","_","View","Dimensions","Text","connect","FontAwesome","COLOUR_GREEN","TEXT_DARK","getMainBrandingColourFromState","MiddlePopup","InlineButton","SCREEN_WIDTH","get","width","WarningPopup","render","createElement","visible","props","onClose","style","styles","popup","padHorizontal","paddingHorizontal","isSuccess","icon","name","text","confirmText","marginTop","infoText","infoTextStyle","onPress","color","ctaButton","colourBrandingMain","button","textStyle","closeText","large","isUndefined","buttonText","maxWidth","paddingVertical","paddingBottom","fontSize","fontFamily","lineHeight","textAlign","mapStateToProps","state","warningPopup"],"sources":["WarningPopup.js"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport _ from \"lodash\";\nimport { View, Dimensions } from \"react-native\";\nimport { Text } from \"./Text\";\nimport { connect } from \"react-redux\";\nimport { FontAwesome } from \"./Icon\";\nimport {\n\tCOLOUR_GREEN,\n\tTEXT_DARK,\n\tgetMainBrandingColourFromState,\n} from \"../colours\";\nimport { MiddlePopup } from \"./MiddlePopup\";\nimport { InlineButton } from \"./InlineButton\";\n\nconst SCREEN_WIDTH = Dimensions.get(\"window\").width;\n\nclass WarningPopup extends PureComponent {\n\trender() {\n\t\treturn (\n\t\t\t<MiddlePopup\n\t\t\t\tvisible={this.props.visible}\n\t\t\t\tonClose={this.props.onClose}\n\t\t\t\tstyle={[\n\t\t\t\t\tstyles.popup,\n\t\t\t\t\tthis.props.padHorizontal && { paddingHorizontal: 16 },\n\t\t\t\t]}\n\t\t\t>\n\t\t\t\t{this.props.isSuccess && (\n\t\t\t\t\t<FontAwesome style={styles.icon} name=\"circle-check\" />\n\t\t\t\t)}\n\t\t\t\t<Text style={styles.text}>{this.props.confirmText}</Text>\n\t\t\t\t<View style={{ marginTop: 16, paddingHorizontal: 24 }}>\n\t\t\t\t\t<Text style={[styles.infoText, this.props.infoTextStyle]}>\n\t\t\t\t\t\t{this.props.infoText}\n\t\t\t\t\t</Text>\n\t\t\t\t</View>\n\t\t\t\t<InlineButton\n\t\t\t\t\tonPress={this.props.onClose}\n\t\t\t\t\tcolor={this.props.ctaButton ? this.props.colourBrandingMain : \"#fff\"}\n\t\t\t\t\tstyle={styles.button}\n\t\t\t\t\ttextStyle={[\n\t\t\t\t\t\tstyles.closeText,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolor: this.props.ctaButton\n\t\t\t\t\t\t\t\t? \"#fff\"\n\t\t\t\t\t\t\t\t: this.props.colourBrandingMain,\n\t\t\t\t\t\t},\n\t\t\t\t\t]}\n\t\t\t\t\tlarge\n\t\t\t\t>\n\t\t\t\t\t{!_.isUndefined(this.props.buttonText)\n\t\t\t\t\t\t? this.props.buttonText\n\t\t\t\t\t\t: \"Close\"}\n\t\t\t\t</InlineButton>\n\t\t\t</MiddlePopup>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tpopup: {\n\t\twidth: \"auto\",\n\t\tmaxWidth: SCREEN_WIDTH - 34,\n\t\tpaddingVertical: 16,\n\t},\n\ticon: {\n\t\tmarginTop: 20,\n\t\tpaddingBottom: 16,\n\t\tfontSize: 52,\n\t\tcolor: COLOUR_GREEN,\n\t},\n\ttext: {\n\t\tfontFamily: \"sf-bold\",\n\t\tfontSize: 24,\n\t\tlineHeight: 24,\n\t\tcolor: TEXT_DARK,\n\t\ttextAlign: \"center\",\n\t\tmarginTop: 8,\n\t},\n\tinfoText: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 16,\n\t\tlineHeight: 22,\n\t\tcolor: TEXT_DARK,\n\t\ttextAlign: \"left\",\n\t},\n\tbutton: {\n\t\twidth: 130,\n\t\tmarginTop: 20,\n\t},\n\tcloseText: {\n\t\tfontFamily: \"sf-medium\",\n\t\tfontSize: 15,\n\t},\n};\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t};\n};\n\nconst warningPopup = connect(mapStateToProps, {})(WarningPopup);\nexport { warningPopup as WarningPopup };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,WAAW,QAAQ,QAAQ;AACpC,SACCC,YAAY,EACZC,SAAS,EACTC,8BAA8B,QACxB,YAAY;AACnB,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,QAAQ,gBAAgB;A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8C,eAAe,EAAE,CAAC,CAAC,CAAC,CAACpC,YAAY,CAAC;AAC/D,SAASsC,YAAY,IAAItC,YAAY","ignoreList":[]}
@@ -1,17 +1,17 @@
1
1
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
- import React from 'react';
5
- import { StyleSheet, View, FlatList, Dimensions, ActivityIndicator, Platform } from 'react-native';
6
- import _ from 'lodash';
7
- import * as ScreenOrientation from 'expo-screen-orientation';
8
- import * as MediaLibrary from 'expo-media-library';
9
- import { Camera } from 'expo-camera';
10
- import { isVideo } from '../../helper';
11
- import ImageTile from './ImageTile';
4
+ import React from "react";
5
+ import { StyleSheet, View, FlatList, Dimensions, ActivityIndicator, Platform } from "react-native";
6
+ import _ from "lodash";
7
+ import * as ScreenOrientation from "expo-screen-orientation";
8
+ import * as MediaLibrary from "expo-media-library";
9
+ import { Camera } from "expo-camera";
10
+ import { isVideo } from "../../helper";
11
+ import ImageTile from "./ImageTile";
12
12
  const {
13
13
  width
14
- } = Dimensions.get('window');
14
+ } = Dimensions.get("window");
15
15
  const defaultSelectionLimit = 10;
16
16
  const defaultLoadCount = 50;
17
17
  export default class ImageBrowser extends React.Component {
@@ -28,8 +28,8 @@ export default class ImageBrowser extends React.Component {
28
28
  status: cameraRoll
29
29
  } = await MediaLibrary.requestPermissionsAsync();
30
30
  this.setState({
31
- hasCameraPermission: camera === 'granted',
32
- hasCameraRollPermission: cameraRoll === 'granted'
31
+ hasCameraPermission: camera === "granted",
32
+ hasCameraRollPermission: cameraRoll === "granted"
33
33
  });
34
34
  });
35
35
  _defineProperty(this, "onOrientationChange", ({
@@ -123,7 +123,7 @@ export default class ImageBrowser extends React.Component {
123
123
  first: loadCount || defaultLoadCount,
124
124
  mediaType,
125
125
  album: album || undefined,
126
- sortBy: [Platform.OS === 'android' ? 'modificationTime' : 'creationTime']
126
+ sortBy: [Platform.OS === "android" ? "modificationTime" : "creationTime"]
127
127
  };
128
128
  if (reset) {
129
129
  this.setState({
@@ -141,7 +141,7 @@ export default class ImageBrowser extends React.Component {
141
141
  // Use remote albums
142
142
  const selectedAlbum = remoteAlbums.find(item => item.id === album);
143
143
  if (selectedAlbum && ((_selectedAlbum$images = selectedAlbum.images) === null || _selectedAlbum$images === void 0 ? void 0 : _selectedAlbum$images.length) > 0) {
144
- const ordered = _.orderBy(selectedAlbum.images, 'date', 'desc');
144
+ const ordered = _.orderBy(selectedAlbum.images, "date", "desc");
145
145
  this.setState({
146
146
  photos: ordered.map(image => {
147
147
  return {