@plusscommunities/pluss-core-app 8.0.0 → 8.0.1-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.
- package/dist/module/actions/FollowerActions.js +4 -4
- package/dist/module/actions/FollowerActions.js.map +1 -1
- package/dist/module/actions/MediaActions.js +1 -1
- package/dist/module/actions/MediaActions.js.map +1 -1
- package/dist/module/actions/ResidentActions.js +1 -1
- package/dist/module/actions/ResidentActions.js.map +1 -1
- package/dist/module/actions/UserActions.js +1 -1
- package/dist/module/actions/UserActions.js.map +1 -1
- package/dist/module/actions/UserSettingsActions.js +1 -1
- package/dist/module/actions/UserSettingsActions.js.map +1 -1
- package/dist/module/actions/index.js +5 -5
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +16 -16
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/apis/analyticsActions.js +5 -5
- package/dist/module/apis/analyticsActions.js.map +1 -1
- package/dist/module/apis/contactActions.js +6 -6
- package/dist/module/apis/contactActions.js.map +1 -1
- package/dist/module/apis/eventActions.js +28 -28
- package/dist/module/apis/eventActions.js.map +1 -1
- package/dist/module/apis/fileActions.js +15 -15
- package/dist/module/apis/fileActions.js.map +1 -1
- package/dist/module/apis/followerActions.js +8 -8
- package/dist/module/apis/followerActions.js.map +1 -1
- package/dist/module/apis/index.js +12 -12
- package/dist/module/apis/index.js.map +1 -1
- package/dist/module/apis/notificationActions.js +17 -17
- package/dist/module/apis/notificationActions.js.map +1 -1
- package/dist/module/apis/profileActions.js +4 -4
- package/dist/module/apis/profileActions.js.map +1 -1
- package/dist/module/apis/reactionActions.js +15 -15
- package/dist/module/apis/reactionActions.js.map +1 -1
- package/dist/module/apis/settingActions.js +6 -6
- package/dist/module/apis/settingActions.js.map +1 -1
- package/dist/module/apis/stringActions.js +8 -8
- package/dist/module/apis/stringActions.js.map +1 -1
- package/dist/module/apis/typeActions.js +4 -4
- package/dist/module/apis/typeActions.js.map +1 -1
- package/dist/module/apis/userActions.js +8 -8
- package/dist/module/apis/userActions.js.map +1 -1
- package/dist/module/assets/icons/fontawesome/fa-brands-400.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-light-300.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-regular-400.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-solid-900.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-thin-100.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa7-glyphmap.json +4205 -0
- package/dist/module/colours.js +26 -29
- package/dist/module/colours.js.map +1 -1
- package/dist/module/components/AddButton.js +8 -8
- package/dist/module/components/AddButton.js.map +1 -1
- package/dist/module/components/AddToCalendarButton.js +30 -29
- package/dist/module/components/AddToCalendarButton.js.map +1 -1
- package/dist/module/components/Attachment.js +10 -9
- package/dist/module/components/Attachment.js.map +1 -1
- package/dist/module/components/AudienceSelectorLauncher.js +11 -11
- package/dist/module/components/AudienceSelectorLauncher.js.map +1 -1
- package/dist/module/components/AudienceSelectorPage.js +45 -44
- package/dist/module/components/AudienceSelectorPage.js.map +1 -1
- package/dist/module/components/AutoOffsetImage.js +13 -13
- package/dist/module/components/AutoOffsetImage.js.map +1 -1
- package/dist/module/components/BackButton.js +10 -10
- package/dist/module/components/BackButton.js.map +1 -1
- package/dist/module/components/CalendarPopup.js +21 -21
- package/dist/module/components/CalendarPopup.js.map +1 -1
- package/dist/module/components/CategoryTabs.js +30 -29
- package/dist/module/components/CategoryTabs.js.map +1 -1
- package/dist/module/components/CommentReply.js +43 -37
- package/dist/module/components/CommentReply.js.map +1 -1
- package/dist/module/components/CommentSection.js +74 -74
- package/dist/module/components/CommentSection.js.map +1 -1
- package/dist/module/components/ConfirmPopup.js +21 -20
- package/dist/module/components/ConfirmPopup.js.map +1 -1
- package/dist/module/components/ConfirmationPopup.js +11 -11
- package/dist/module/components/ConfirmationPopup.js.map +1 -1
- package/dist/module/components/DocumentUploader.js +50 -50
- package/dist/module/components/DocumentUploader.js.map +1 -1
- package/dist/module/components/DropDownItem.js +14 -13
- package/dist/module/components/DropDownItem.js.map +1 -1
- package/dist/module/components/DropDownMenu.js +5 -5
- package/dist/module/components/DropDownMenu.js.map +1 -1
- package/dist/module/components/EmptyStateMain.js +10 -9
- package/dist/module/components/EmptyStateMain.js.map +1 -1
- package/dist/module/components/EmptyStateWidget.js +7 -6
- package/dist/module/components/EmptyStateWidget.js.map +1 -1
- package/dist/module/components/FontScaleButton.js +5 -4
- package/dist/module/components/FontScaleButton.js.map +1 -1
- package/dist/module/components/FontScalePopup.js +11 -10
- package/dist/module/components/FontScalePopup.js.map +1 -1
- package/dist/module/components/Forbidden.js +13 -13
- package/dist/module/components/Forbidden.js.map +1 -1
- package/dist/module/components/FormCard.js +4 -4
- package/dist/module/components/FormCard.js.map +1 -1
- package/dist/module/components/FormCardSection.js +20 -18
- package/dist/module/components/FormCardSection.js.map +1 -1
- package/dist/module/components/FormCardSectionOptionLauncher.js +13 -12
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -1
- package/dist/module/components/FormattedText.js +18 -16
- package/dist/module/components/FormattedText.js.map +1 -1
- package/dist/module/components/GenericInput.js +24 -21
- package/dist/module/components/GenericInput.js.map +1 -1
- package/dist/module/components/GenericInputSection.js +27 -26
- package/dist/module/components/GenericInputSection.js.map +1 -1
- package/dist/module/components/Header.js +70 -69
- package/dist/module/components/Header.js.map +1 -1
- package/dist/module/components/Icon.js +109 -0
- package/dist/module/components/Icon.js.map +1 -0
- package/dist/module/components/ImagePopup.js +211 -73
- package/dist/module/components/ImagePopup.js.map +1 -1
- package/dist/module/components/ImageUploadProgress.js +10 -9
- package/dist/module/components/ImageUploadProgress.js.map +1 -1
- package/dist/module/components/ImageUploader.js +116 -96
- package/dist/module/components/ImageUploader.js.map +1 -1
- package/dist/module/components/InlineButton.js +9 -8
- package/dist/module/components/InlineButton.js.map +1 -1
- package/dist/module/components/Input.js +28 -26
- package/dist/module/components/Input.js.map +1 -1
- package/dist/module/components/LoadingCircles.js +20 -20
- package/dist/module/components/LoadingCircles.js.map +1 -1
- package/dist/module/components/LoadingIndicator.js +11 -11
- package/dist/module/components/LoadingIndicator.js.map +1 -1
- package/dist/module/components/LoadingStateWidget.js +5 -5
- package/dist/module/components/LoadingStateWidget.js.map +1 -1
- package/dist/module/components/MediaPlayer.js +31 -31
- package/dist/module/components/MediaPlayer.js.map +1 -1
- package/dist/module/components/MiddlePopup.js +17 -11
- package/dist/module/components/MiddlePopup.js.map +1 -1
- package/dist/module/components/PDFPopup.js +52 -39
- package/dist/module/components/PDFPopup.js.map +1 -1
- package/dist/module/components/PlussChat.js +168 -149
- package/dist/module/components/PlussChat.js.map +1 -1
- package/dist/module/components/PlussChatMessage.js +42 -42
- package/dist/module/components/PlussChatMessage.js.map +1 -1
- package/dist/module/components/PlussChatTime.js +18 -17
- package/dist/module/components/PlussChatTime.js.map +1 -1
- package/dist/module/components/Popup.js +20 -19
- package/dist/module/components/Popup.js.map +1 -1
- package/dist/module/components/PopupMenu.js +15 -14
- package/dist/module/components/PopupMenu.js.map +1 -1
- package/dist/module/components/PositionedImage.js +20 -20
- package/dist/module/components/PositionedImage.js.map +1 -1
- package/dist/module/components/ProfilePic.js +10 -10
- package/dist/module/components/ProfilePic.js.map +1 -1
- package/dist/module/components/RadioButton.js +10 -9
- package/dist/module/components/RadioButton.js.map +1 -1
- package/dist/module/components/Reaction.js +18 -17
- package/dist/module/components/Reaction.js.map +1 -1
- package/dist/module/components/Reactions.js +7 -7
- package/dist/module/components/Reactions.js.map +1 -1
- package/dist/module/components/SharingTools.js +78 -43
- package/dist/module/components/SharingTools.js.map +1 -1
- package/dist/module/components/Spinner.js +5 -5
- package/dist/module/components/Spinner.js.map +1 -1
- package/dist/module/components/StickyFooter.js +6 -6
- package/dist/module/components/StickyFooter.js.map +1 -1
- package/dist/module/components/Text.js +57 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/TickIcon.js +6 -6
- package/dist/module/components/TickIcon.js.map +1 -1
- package/dist/module/components/Toggle.js +10 -9
- package/dist/module/components/Toggle.js.map +1 -1
- package/dist/module/components/TouchableSearchBar.js +18 -17
- package/dist/module/components/TouchableSearchBar.js.map +1 -1
- package/dist/module/components/UserListPopup.js +20 -19
- package/dist/module/components/UserListPopup.js.map +1 -1
- package/dist/module/components/UserListing.js +41 -40
- package/dist/module/components/UserListing.js.map +1 -1
- package/dist/module/components/VideoPopup.js +20 -20
- package/dist/module/components/VideoPopup.js.map +1 -1
- package/dist/module/components/WarningPopup.js +21 -20
- package/dist/module/components/WarningPopup.js.map +1 -1
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +13 -13
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -1
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +24 -23
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -1
- package/dist/module/components/index.js +59 -58
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +94 -64
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -1
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +64 -64
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -1
- package/dist/module/config.js +15 -10
- package/dist/module/config.js.map +1 -1
- package/dist/module/constants.js +3 -4
- package/dist/module/constants.js.map +1 -1
- package/dist/module/helper.js +83 -82
- package/dist/module/helper.js.map +1 -1
- package/dist/module/index.js +12 -12
- package/dist/module/index.js.map +1 -1
- package/dist/module/js/images/detectFaces.js +11 -10
- package/dist/module/js/images/detectFaces.js.map +1 -1
- package/dist/module/js/images/findLandmarkRange.js +8 -8
- package/dist/module/js/images/findLandmarkRange.js.map +1 -1
- package/dist/module/js/images/getScaledOffset.js.map +1 -1
- package/dist/module/js/site/getSiteLevelFromState.js +2 -2
- package/dist/module/js/site/getSiteLevelFromState.js.map +1 -1
- package/dist/module/js/site/isTVEnabled.js +2 -2
- package/dist/module/js/site/isTVEnabled.js.map +1 -1
- package/dist/module/session.js +6 -6
- package/dist/module/session.js.map +1 -1
- package/dist/module/styles.js +17 -17
- package/dist/module/styles.js.map +1 -1
- package/dist/module/withNavigationFocus.js +30 -0
- package/dist/module/withNavigationFocus.js.map +1 -0
- package/package.json +71 -68
- package/src/actions/FollowerActions.js +36 -32
- package/src/actions/MediaActions.js +25 -20
- package/src/actions/ResidentActions.js +26 -21
- package/src/actions/UserActions.js +22 -22
- package/src/actions/UserSettingsActions.js +11 -11
- package/src/actions/index.js +5 -5
- package/src/actions/types.js +16 -16
- package/src/apis/analyticsActions.js +17 -17
- package/src/apis/contactActions.js +20 -20
- package/src/apis/eventActions.js +153 -144
- package/src/apis/fileActions.js +96 -86
- package/src/apis/followerActions.js +29 -29
- package/src/apis/index.js +12 -12
- package/src/apis/notificationActions.js +44 -44
- package/src/apis/profileActions.js +8 -8
- package/src/apis/reactionActions.js +81 -73
- package/src/apis/settingActions.js +15 -15
- package/src/apis/stringActions.js +29 -25
- package/src/apis/typeActions.js +10 -10
- package/src/apis/userActions.js +93 -93
- package/src/assets/icons/fontawesome/fa-brands-400.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-light-300.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-regular-400.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-solid-900.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-thin-100.ttf +0 -0
- package/src/assets/icons/fontawesome/fa7-glyphmap.json +4205 -0
- package/src/colours.js +116 -96
- package/src/components/AddButton.js +32 -27
- package/src/components/AddToCalendarButton.js +236 -202
- package/src/components/Attachment.js +59 -36
- package/src/components/AudienceSelectorLauncher.js +52 -48
- package/src/components/AudienceSelectorPage.js +353 -311
- package/src/components/AutoOffsetImage.js +237 -196
- package/src/components/BackButton.js +57 -41
- package/src/components/CalendarPopup.js +127 -97
- package/src/components/CategoryTabs.js +208 -163
- package/src/components/CommentReply.js +370 -309
- package/src/components/CommentSection.js +974 -781
- package/src/components/ConfirmPopup.js +141 -110
- package/src/components/ConfirmationPopup.js +80 -69
- package/src/components/DocumentUploader.js +245 -215
- package/src/components/DropDownItem.js +70 -60
- package/src/components/DropDownMenu.js +31 -27
- package/src/components/EmptyStateMain.js +51 -44
- package/src/components/EmptyStateWidget.js +47 -38
- package/src/components/FontScaleButton.js +29 -25
- package/src/components/FontScalePopup.js +67 -56
- package/src/components/Forbidden.js +48 -46
- package/src/components/FormCard.js +21 -17
- package/src/components/FormCardSection.js +284 -233
- package/src/components/FormCardSectionOptionLauncher.js +72 -46
- package/src/components/FormattedText.js +128 -111
- package/src/components/GenericInput.js +168 -136
- package/src/components/GenericInputSection.js +209 -161
- package/src/components/Header.js +620 -474
- package/src/components/Icon.js +119 -0
- package/src/components/ImagePopup.js +425 -221
- package/src/components/ImageUploadProgress.js +49 -41
- package/src/components/ImageUploader.js +968 -797
- package/src/components/InlineButton.js +79 -69
- package/src/components/Input.js +190 -156
- package/src/components/LoadingCircles.js +233 -233
- package/src/components/LoadingIndicator.js +87 -76
- package/src/components/LoadingStateWidget.js +47 -37
- package/src/components/MediaPlayer.js +416 -387
- package/src/components/MiddlePopup.js +62 -33
- package/src/components/PDFPopup.js +212 -159
- package/src/components/PlussChat.js +1224 -1025
- package/src/components/PlussChatMessage.js +329 -298
- package/src/components/PlussChatTime.js +57 -53
- package/src/components/Popup.js +138 -116
- package/src/components/PopupMenu.js +140 -110
- package/src/components/PositionedImage.js +281 -237
- package/src/components/ProfilePic.js +122 -113
- package/src/components/RadioButton.js +76 -52
- package/src/components/Reaction.js +134 -96
- package/src/components/Reactions.js +65 -63
- package/src/components/SharingTools.js +185 -134
- package/src/components/Spinner.js +13 -13
- package/src/components/StickyFooter.js +36 -26
- package/src/components/Text.js +62 -0
- package/src/components/TickIcon.js +20 -20
- package/src/components/Toggle.js +74 -73
- package/src/components/TouchableSearchBar.js +68 -50
- package/src/components/UserListPopup.js +161 -124
- package/src/components/UserListing.js +273 -238
- package/src/components/VideoPopup.js +110 -96
- package/src/components/WarningPopup.js +92 -71
- package/src/components/expo-image-picker-multiple/ImageBrowser.js +288 -256
- package/src/components/expo-image-picker-multiple/ImageTile.js +108 -84
- package/src/components/index.js +59 -58
- package/src/components/react-native-expo-image-cropper/ExpoImageManipulator.js +444 -359
- package/src/components/react-native-expo-image-cropper/ImageCropOverlay.js +420 -324
- package/src/config.js +26 -21
- package/src/constants.js +8 -10
- package/src/helper.js +469 -438
- package/src/index.js +24 -12
- package/src/js/images/detectFaces.js +28 -21
- package/src/js/images/findLandmarkRange.js +97 -90
- package/src/js/images/getScaledOffset.js +80 -75
- package/src/js/site/getSiteLevelFromState.js +26 -26
- package/src/js/site/isTVEnabled.js +10 -10
- package/src/session.js +32 -32
- package/src/styles.js +61 -61
- package/src/withNavigationFocus.js +28 -0
- package/dist/module/components/TextStyle.js +0 -45
- package/dist/module/components/TextStyle.js.map +0 -1
- package/dist/module/fonts/index.js +0 -2
- package/dist/module/fonts/index.js.map +0 -1
- package/dist/module/fonts/pluss60-icons.js +0 -5
- package/dist/module/fonts/pluss60-icons.js.map +0 -1
- package/dist/module/fonts/pluss60-icons.json +0 -1097
- package/src/components/TextStyle.js +0 -48
- package/src/fonts/index.js +0 -1
- package/src/fonts/pluss60-icons.js +0 -7
- package/src/fonts/pluss60-icons.json +0 -1097
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import { Text
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import { Text } from "@plusscommunities/pluss-core-app/components";
|
|
3
|
+
import { View, Dimensions, Modal, ScrollView, TouchableWithoutFeedback, Platform } from "react-native";
|
|
4
|
+
import { connect } from "react-redux";
|
|
5
|
+
import { TEXT_DARK, LINEGREY, getMainBrandingColourFromState } from "../colours";
|
|
6
|
+
import UserListing from "./UserListing";
|
|
7
|
+
import { InlineButton } from "./InlineButton";
|
|
8
|
+
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
|
8
9
|
class UserListPopup extends Component {
|
|
9
10
|
getRenderKey(user, userKey) {
|
|
10
11
|
if (user.id) {
|
|
@@ -63,10 +64,10 @@ class UserListPopup extends Component {
|
|
|
63
64
|
style: styles.popupOverlay
|
|
64
65
|
})), /*#__PURE__*/React.createElement(View, {
|
|
65
66
|
style: [styles.popupContent, {
|
|
66
|
-
minHeight: SCREEN_HEIGHT - (Platform.OS ===
|
|
67
|
+
minHeight: SCREEN_HEIGHT - (Platform.OS === "android" ? 175 : 150)
|
|
67
68
|
}, {
|
|
68
69
|
marginTop: 60,
|
|
69
|
-
minHeight: SCREEN_HEIGHT - (Platform.OS ===
|
|
70
|
+
minHeight: SCREEN_HEIGHT - (Platform.OS === "android" ? 85 : 60)
|
|
70
71
|
}]
|
|
71
72
|
}, this.renderHeader(), this.renderScrollContainer(), this.renderFooter()))));
|
|
72
73
|
}
|
|
@@ -74,11 +75,11 @@ class UserListPopup extends Component {
|
|
|
74
75
|
const styles = {
|
|
75
76
|
popup: {
|
|
76
77
|
flex: 1,
|
|
77
|
-
justifyContent:
|
|
78
|
+
justifyContent: "center"
|
|
78
79
|
},
|
|
79
80
|
popupOverlay: {
|
|
80
|
-
position:
|
|
81
|
-
backgroundColor:
|
|
81
|
+
position: "absolute",
|
|
82
|
+
backgroundColor: "rgba(19, 19, 26, .25)",
|
|
82
83
|
top: 0,
|
|
83
84
|
left: 0,
|
|
84
85
|
right: 0,
|
|
@@ -87,7 +88,7 @@ const styles = {
|
|
|
87
88
|
popupContent: {
|
|
88
89
|
borderRadius: 3,
|
|
89
90
|
marginTop: 150,
|
|
90
|
-
backgroundColor:
|
|
91
|
+
backgroundColor: "#fff",
|
|
91
92
|
flex: 1,
|
|
92
93
|
borderTopLeftRadius: 15,
|
|
93
94
|
borderTopRightRadius: 15
|
|
@@ -96,14 +97,14 @@ const styles = {
|
|
|
96
97
|
padding: 8,
|
|
97
98
|
borderTopWidth: 1,
|
|
98
99
|
borderColor: LINEGREY,
|
|
99
|
-
backgroundColor:
|
|
100
|
+
backgroundColor: "#fff"
|
|
100
101
|
},
|
|
101
102
|
footerButton: {
|
|
102
|
-
width:
|
|
103
|
+
width: "100%",
|
|
103
104
|
height: 40
|
|
104
105
|
},
|
|
105
106
|
titleContainer: {
|
|
106
|
-
alignSelf:
|
|
107
|
+
alignSelf: "stretch",
|
|
107
108
|
padding: 24,
|
|
108
109
|
paddingTop: 16,
|
|
109
110
|
paddingBottom: 0
|
|
@@ -111,13 +112,13 @@ const styles = {
|
|
|
111
112
|
titleContent: {
|
|
112
113
|
borderColor: LINEGREY,
|
|
113
114
|
borderBottomWidth: 1,
|
|
114
|
-
flexDirection:
|
|
115
|
-
justifyContent:
|
|
115
|
+
flexDirection: "row",
|
|
116
|
+
justifyContent: "space-between",
|
|
116
117
|
paddingBottom: 15
|
|
117
118
|
},
|
|
118
119
|
title: {
|
|
119
120
|
fontSize: 15,
|
|
120
|
-
fontFamily:
|
|
121
|
+
fontFamily: "sf-semibold",
|
|
121
122
|
color: TEXT_DARK
|
|
122
123
|
},
|
|
123
124
|
optionsContainer: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","Text","View","Dimensions","Modal","ScrollView","TouchableWithoutFeedback","Platform","connect","TEXT_DARK","LINEGREY","getMainBrandingColourFromState","UserListing","InlineButton","SCREEN_HEIGHT","get","height","UserListPopup","getRenderKey","user","userKey","id","userId","renderHeader","createElement","style","styles","titleContainer","titleContent","title","props","renderScrollContainer","optionsContainer","keyboardShouldPersistTaps","users","map","userIndex","key","index","scrollFooterSpace","renderFooter","footer","onPress","onClose","bind","color","colourBrandingMain","footerButton","render","visible","transparent","animationType","onRequestClose","popup","popupOverlay","popupContent","minHeight","OS","marginTop","flex","justifyContent","position","backgroundColor","top","left","right","bottom","borderRadius","borderTopLeftRadius","borderTopRightRadius","padding","borderTopWidth","borderColor","width","alignSelf","paddingTop","paddingBottom","borderBottomWidth","flexDirection","fontSize","fontFamily","paddingVertical","mapStateToProps","state","userListPopup"],"sources":["UserListPopup.js"],"sourcesContent":["import React, { Component } from
|
|
1
|
+
{"version":3,"names":["React","Component","Text","View","Dimensions","Modal","ScrollView","TouchableWithoutFeedback","Platform","connect","TEXT_DARK","LINEGREY","getMainBrandingColourFromState","UserListing","InlineButton","SCREEN_HEIGHT","get","height","UserListPopup","getRenderKey","user","userKey","id","userId","renderHeader","createElement","style","styles","titleContainer","titleContent","title","props","renderScrollContainer","optionsContainer","keyboardShouldPersistTaps","users","map","userIndex","key","index","scrollFooterSpace","renderFooter","footer","onPress","onClose","bind","color","colourBrandingMain","footerButton","render","visible","transparent","animationType","onRequestClose","popup","popupOverlay","popupContent","minHeight","OS","marginTop","flex","justifyContent","position","backgroundColor","top","left","right","bottom","borderRadius","borderTopLeftRadius","borderTopRightRadius","padding","borderTopWidth","borderColor","width","alignSelf","paddingTop","paddingBottom","borderBottomWidth","flexDirection","fontSize","fontFamily","paddingVertical","mapStateToProps","state","userListPopup"],"sources":["UserListPopup.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport { Text } from \"@plusscommunities/pluss-core-app/components\";\nimport {\n\tView,\n\tDimensions,\n\tModal,\n\tScrollView,\n\tTouchableWithoutFeedback,\n\tPlatform,\n} from \"react-native\";\nimport { connect } from \"react-redux\";\nimport {\n\tTEXT_DARK,\n\tLINEGREY,\n\tgetMainBrandingColourFromState,\n} from \"../colours\";\nimport UserListing from \"./UserListing\";\nimport { InlineButton } from \"./InlineButton\";\n\nconst SCREEN_HEIGHT = Dimensions.get(\"window\").height;\n\nclass UserListPopup extends Component {\n\tgetRenderKey(user, userKey) {\n\t\tif (user.id) {\n\t\t\treturn `${user.id}${userKey}`;\n\t\t}\n\t\tif (user.userId) {\n\t\t\treturn `${user.userId}${userKey}`;\n\t\t}\n\t\treturn userKey;\n\t}\n\n\trenderHeader() {\n\t\treturn (\n\t\t\t<View style={styles.titleContainer}>\n\t\t\t\t<View style={styles.titleContent}>\n\t\t\t\t\t<Text style={styles.title}>{this.props.title}</Text>\n\t\t\t\t</View>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trenderScrollContainer() {\n\t\treturn (\n\t\t\t<ScrollView\n\t\t\t\tstyle={styles.optionsContainer}\n\t\t\t\tkeyboardShouldPersistTaps=\"handled\"\n\t\t\t>\n\t\t\t\t{this.props.users.map((user, userIndex) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<UserListing\n\t\t\t\t\t\t\tuser={user}\n\t\t\t\t\t\t\tkey={this.getRenderKey(user, userIndex)}\n\t\t\t\t\t\t\tindex={userIndex}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t\t<View style={styles.scrollFooterSpace} />\n\t\t\t</ScrollView>\n\t\t);\n\t}\n\n\trenderFooter() {\n\t\treturn (\n\t\t\t<View style={styles.footer}>\n\t\t\t\t<InlineButton\n\t\t\t\t\tonPress={this.props.onClose.bind(this)}\n\t\t\t\t\tcolor={this.props.colourBrandingMain}\n\t\t\t\t\tstyle={[styles.footerButton]}\n\t\t\t\t>\n\t\t\t\t\tDone\n\t\t\t\t</InlineButton>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tvisible={this.props.visible}\n\t\t\t\ttransparent\n\t\t\t\tanimationType=\"slide\"\n\t\t\t\tonRequestClose={this.props.onClose}\n\t\t\t>\n\t\t\t\t<ScrollView keyboardShouldPersistTaps=\"always\">\n\t\t\t\t\t<View style={styles.popup}>\n\t\t\t\t\t\t<TouchableWithoutFeedback onPress={this.props.onClose}>\n\t\t\t\t\t\t\t<View style={styles.popupOverlay} />\n\t\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t\t\t<View\n\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\tstyles.popupContent,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tminHeight:\n\t\t\t\t\t\t\t\t\t\tSCREEN_HEIGHT - (Platform.OS === \"android\" ? 175 : 150),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmarginTop: 60,\n\t\t\t\t\t\t\t\t\tminHeight:\n\t\t\t\t\t\t\t\t\t\tSCREEN_HEIGHT - (Platform.OS === \"android\" ? 85 : 60),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.renderHeader()}\n\t\t\t\t\t\t\t{this.renderScrollContainer()}\n\t\t\t\t\t\t\t{this.renderFooter()}\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t</ScrollView>\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tpopup: {\n\t\tflex: 1,\n\t\tjustifyContent: \"center\",\n\t},\n\tpopupOverlay: {\n\t\tposition: \"absolute\",\n\t\tbackgroundColor: \"rgba(19, 19, 26, .25)\",\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tright: 0,\n\t\tbottom: 0,\n\t},\n\tpopupContent: {\n\t\tborderRadius: 3,\n\t\tmarginTop: 150,\n\t\tbackgroundColor: \"#fff\",\n\t\tflex: 1,\n\t\tborderTopLeftRadius: 15,\n\t\tborderTopRightRadius: 15,\n\t},\n\tfooter: {\n\t\tpadding: 8,\n\t\tborderTopWidth: 1,\n\t\tborderColor: LINEGREY,\n\t\tbackgroundColor: \"#fff\",\n\t},\n\tfooterButton: {\n\t\twidth: \"100%\",\n\t\theight: 40,\n\t},\n\ttitleContainer: {\n\t\talignSelf: \"stretch\",\n\t\tpadding: 24,\n\t\tpaddingTop: 16,\n\t\tpaddingBottom: 0,\n\t},\n\ttitleContent: {\n\t\tborderColor: LINEGREY,\n\t\tborderBottomWidth: 1,\n\t\tflexDirection: \"row\",\n\t\tjustifyContent: \"space-between\",\n\t\tpaddingBottom: 15,\n\t},\n\ttitle: {\n\t\tfontSize: 15,\n\t\tfontFamily: \"sf-semibold\",\n\t\tcolor: TEXT_DARK,\n\t},\n\toptionsContainer: {\n\t\tflex: 1,\n\t\tpaddingVertical: 8,\n\t},\n};\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t};\n};\n\nconst userListPopup = connect(mapStateToProps, {})(UserListPopup);\nexport { userListPopup as UserListPopup };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,QAAQ,6CAA6C;AAClE,SACCC,IAAI,EACJC,UAAU,EACVC,KAAK,EACLC,UAAU,EACVC,wBAAwB,EACxBC,QAAQ,QACF,cAAc;AACrB,SAASC,OAAO,QAAQ,aAAa;AACrC,SACCC,SAAS,EACTC,QAAQ,EACRC,8BAA8B,QACxB,YAAY;AACnB,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,YAAY,QAAQ,gBAAgB;AAE7C,MAAMC,aAAa,GAAGX,UAAU,CAACY,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM;AAErD,MAAMC,aAAa,SAASjB,SAAS,CAAC;EACrCkB,YAAYA,CAACC,IAAI,EAAEC,OAAO,EAAE;IAC3B,IAAID,IAAI,CAACE,EAAE,EAAE;MACZ,OAAO,GAAGF,IAAI,CAACE,EAAE,GAAGD,OAAO,EAAE;IAC9B;IACA,IAAID,IAAI,CAACG,MAAM,EAAE;MAChB,OAAO,GAAGH,IAAI,CAACG,MAAM,GAAGF,OAAO,EAAE;IAClC;IACA,OAAOA,OAAO;EACf;EAEAG,YAAYA,CAAA,EAAG;IACd,oBACCxB,KAAA,CAAAyB,aAAA,CAACtB,IAAI;MAACuB,KAAK,EAAEC,MAAM,CAACC;IAAe,gBAClC5B,KAAA,CAAAyB,aAAA,CAACtB,IAAI;MAACuB,KAAK,EAAEC,MAAM,CAACE;IAAa,gBAChC7B,KAAA,CAAAyB,aAA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ACPS,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE;EACvB,CAAC;EACD5B,MAAM,EAAE;IACP6B,OAAO,EAAE,CAAC;IACVC,cAAc,EAAE,CAAC;IACjBC,WAAW,EAAE9D,QAAQ;IACrBoD,eAAe,EAAE;EAClB,CAAC;EACDf,YAAY,EAAE;IACb0B,KAAK,EAAE,MAAM;IACbzD,MAAM,EAAE;EACT,CAAC;EACDW,cAAc,EAAE;IACf+C,SAAS,EAAE,SAAS;IACpBJ,OAAO,EAAE,EAAE;IACXK,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EAChB,CAAC;EACDhD,YAAY,EAAE;IACb4C,WAAW,EAAE9D,QAAQ;IACrBmE,iBAAiB,EAAE,CAAC;IACpBC,aAAa,EAAE,KAAK;IACpBlB,cAAc,EAAE,eAAe;IAC/BgB,aAAa,EAAE;EAChB,CAAC;EACD/C,KAAK,EAAE;IACNkD,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,aAAa;IACzBnC,KAAK,EAAEpC;EACR,CAAC;EACDuB,gBAAgB,EAAE;IACjB2B,IAAI,EAAE,CAAC;IACPsB,eAAe,EAAE;EAClB;AACD,CAAC;AAED,MAAMC,eAAe,GAAIC,KAAK,IAAK;EAClC,OAAO;IACNrC,kBAAkB,EAAEnC,8BAA8B,CAACwE,KAAK;EACzD,CAAC;AACF,CAAC;AAED,MAAMC,aAAa,GAAG5E,OAAO,CAAC0E,eAAe,EAAE,CAAC,CAAC,CAAC,CAACjE,aAAa,CAAC;AACjE,SAASmE,aAAa,IAAInE,aAAa","ignoreList":[]}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import _ from
|
|
3
|
-
import { TouchableOpacity,
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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,
|
|
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(
|
|
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(
|
|
62
|
-
return gug.format(
|
|
62
|
+
if (gug.isBefore(moment().local().startOf("d"))) {
|
|
63
|
+
return gug.format("D MMM");
|
|
63
64
|
}
|
|
64
|
-
return gug.format(
|
|
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(
|
|
72
|
-
profilePic = profilePic.replace(
|
|
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 ===
|
|
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:
|
|
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:
|
|
93
|
+
fontFamily: "sf-bold"
|
|
93
94
|
}]
|
|
94
95
|
}, this.getTimeText(this.props.user.Changed)), /*#__PURE__*/React.createElement(View, {
|
|
95
96
|
style: [{
|
|
96
|
-
flexDirection:
|
|
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:
|
|
196
|
-
flexDirection:
|
|
197
|
-
position:
|
|
196
|
+
justifyContent: "flex-start",
|
|
197
|
+
flexDirection: "row",
|
|
198
|
+
position: "relative"
|
|
198
199
|
},
|
|
199
200
|
listItemTextContainer: {
|
|
200
201
|
flex: 1,
|
|
201
|
-
flexDirection:
|
|
202
|
-
justifyContent:
|
|
202
|
+
flexDirection: "column",
|
|
203
|
+
justifyContent: "space-around",
|
|
203
204
|
paddingLeft: 16
|
|
204
205
|
},
|
|
205
206
|
contactName: {
|
|
206
207
|
fontSize: 15,
|
|
207
|
-
fontFamily:
|
|
208
|
-
backgroundColor:
|
|
208
|
+
fontFamily: "sf-semibold",
|
|
209
|
+
backgroundColor: "rgba(255,255,255,0)",
|
|
209
210
|
color: TEXT_DARK
|
|
210
211
|
},
|
|
211
212
|
statusText: {
|
|
212
|
-
position:
|
|
213
|
+
position: "absolute",
|
|
213
214
|
top: 0,
|
|
214
215
|
left: 82,
|
|
215
|
-
fontFamily:
|
|
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:
|
|
224
|
+
alignItems: "center"
|
|
224
225
|
},
|
|
225
226
|
flexRowReverse: {
|
|
226
|
-
flexDirection:
|
|
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:
|
|
235
|
+
justifyContent: "center",
|
|
235
236
|
minWidth: 20,
|
|
236
237
|
paddingHorizontal: 4,
|
|
237
238
|
backgroundColor: COLOUR_GREEN
|
|
238
239
|
},
|
|
239
240
|
counterText: {
|
|
240
|
-
color:
|
|
241
|
+
color: "#fff",
|
|
241
242
|
fontSize: 12,
|
|
242
|
-
fontFamily:
|
|
243
|
-
textAlign:
|
|
243
|
+
fontFamily: "sf-semibold",
|
|
244
|
+
textAlign: "center"
|
|
244
245
|
},
|
|
245
246
|
chatTimeStamp: {
|
|
246
247
|
fontSize: 10,
|
|
247
|
-
fontFamily:
|
|
248
|
+
fontFamily: "sf-semibold",
|
|
248
249
|
color: TEXT_LIGHT
|
|
249
250
|
},
|
|
250
251
|
chatLastMessage: {
|
|
251
252
|
fontSize: 13,
|
|
252
|
-
fontFamily:
|
|
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"],"m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U;IACjB+G,WAAW,EAAE;EACf;AACF,CAAC;AAED,MAAMC,eAAe,GAAGpG,KAAK,IAAI;EAC/B,OAAO;IACLI,EAAE,EAAEJ,KAAK,CAACM,IAAI;IACdqD,kBAAkB,EAAEtE,8BAA8B,CAACW,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,gBAAg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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
|
|
5
|
-
import { Platform, View, Modal, TouchableOpacity, StyleSheet } from
|
|
6
|
-
import * as ScreenOrientation from
|
|
7
|
-
import { StatusBarHeight, getCompressed, imageExists } from
|
|
8
|
-
import {
|
|
9
|
-
import { SharingTools } from
|
|
10
|
-
import MediaPlayer from
|
|
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 ===
|
|
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(
|
|
44
|
-
name: "
|
|
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 ||
|
|
76
|
+
animationType: animationType || "fade",
|
|
77
77
|
onRequestClose: onClose,
|
|
78
78
|
style: [styles.container, style],
|
|
79
|
-
supportedOrientations: [
|
|
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:
|
|
87
|
+
backgroundColor: "#000"
|
|
88
88
|
},
|
|
89
89
|
menuIconContainer: {
|
|
90
|
-
position:
|
|
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:
|
|
102
|
-
color:
|
|
101
|
+
textAlign: "center",
|
|
102
|
+
color: "#fff",
|
|
103
103
|
zIndex: 3
|
|
104
104
|
},
|
|
105
105
|
playerContainer: {
|
|
106
106
|
flex: 1,
|
|
107
|
-
backgroundColor:
|
|
108
|
-
alignItems:
|
|
109
|
-
justifyContent:
|
|
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","
|
|
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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