@plusscommunities/pluss-core-app 8.0.1-beta.0 → 8.0.2-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 +122 -97
- 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 +152 -46
- 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 +113 -76
- 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 +81 -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 +973 -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 +307 -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 +447 -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,33 +1,38 @@
|
|
|
1
|
-
import React, { PureComponent } from
|
|
2
|
-
import { View, Modal, TouchableWithoutFeedback, KeyboardAvoidingView, Platform } from
|
|
1
|
+
import React, { PureComponent } from "react";
|
|
2
|
+
import { View, Modal, TouchableWithoutFeedback, KeyboardAvoidingView, Platform } from "react-native";
|
|
3
|
+
import { withSafeAreaInsets } from "react-native-safe-area-context";
|
|
3
4
|
class MiddlePopup extends PureComponent {
|
|
4
5
|
render() {
|
|
6
|
+
var _this$props$insets;
|
|
7
|
+
const bottom = Platform.OS === "android" ? ((_this$props$insets = this.props.insets) === null || _this$props$insets === void 0 ? void 0 : _this$props$insets.bottom) ?? 0 : 0;
|
|
5
8
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
6
9
|
visible: this.props.visible,
|
|
7
10
|
transparent: true,
|
|
8
11
|
animationType: "fade",
|
|
9
12
|
onRequestClose: this.props.onClose
|
|
10
13
|
}, /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
11
|
-
behavior: this.props.keyboardAvoid && Platform.OS ===
|
|
14
|
+
behavior: this.props.keyboardAvoid && Platform.OS === "ios" && "padding",
|
|
12
15
|
style: styles.popup
|
|
13
16
|
}, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
|
14
17
|
onPress: this.props.onClose
|
|
15
18
|
}, /*#__PURE__*/React.createElement(View, {
|
|
16
19
|
style: styles.popupOverlay
|
|
17
20
|
})), /*#__PURE__*/React.createElement(View, {
|
|
18
|
-
style: [styles.popupContent, this.props.style
|
|
21
|
+
style: [styles.popupContent, this.props.style, bottom > 0 && {
|
|
22
|
+
paddingBottom: bottom
|
|
23
|
+
}]
|
|
19
24
|
}, this.props.children)));
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
const styles = {
|
|
23
28
|
popup: {
|
|
24
29
|
flex: 1,
|
|
25
|
-
justifyContent:
|
|
26
|
-
alignItems:
|
|
30
|
+
justifyContent: "center",
|
|
31
|
+
alignItems: "center"
|
|
27
32
|
},
|
|
28
33
|
popupOverlay: {
|
|
29
|
-
position:
|
|
30
|
-
backgroundColor:
|
|
34
|
+
position: "absolute",
|
|
35
|
+
backgroundColor: "rgba(19, 19, 26, .25)",
|
|
31
36
|
top: 0,
|
|
32
37
|
left: 0,
|
|
33
38
|
right: 0,
|
|
@@ -35,9 +40,10 @@ const styles = {
|
|
|
35
40
|
},
|
|
36
41
|
popupContent: {
|
|
37
42
|
borderRadius: 12,
|
|
38
|
-
backgroundColor:
|
|
39
|
-
alignItems:
|
|
43
|
+
backgroundColor: "#fff",
|
|
44
|
+
alignItems: "center"
|
|
40
45
|
}
|
|
41
46
|
};
|
|
42
|
-
|
|
47
|
+
const MiddlePopupWithInsets = withSafeAreaInsets(MiddlePopup);
|
|
48
|
+
export { MiddlePopupWithInsets as MiddlePopup };
|
|
43
49
|
//# sourceMappingURL=MiddlePopup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","View","Modal","TouchableWithoutFeedback","KeyboardAvoidingView","Platform","MiddlePopup","render","
|
|
1
|
+
{"version":3,"names":["React","PureComponent","View","Modal","TouchableWithoutFeedback","KeyboardAvoidingView","Platform","withSafeAreaInsets","MiddlePopup","render","_this$props$insets","bottom","OS","props","insets","createElement","visible","transparent","animationType","onRequestClose","onClose","behavior","keyboardAvoid","style","styles","popup","onPress","popupOverlay","popupContent","paddingBottom","children","flex","justifyContent","alignItems","position","backgroundColor","top","left","right","borderRadius","MiddlePopupWithInsets"],"sources":["MiddlePopup.js"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport {\n\tView,\n\tModal,\n\tTouchableWithoutFeedback,\n\tKeyboardAvoidingView,\n\tPlatform,\n} from \"react-native\";\nimport { withSafeAreaInsets } from \"react-native-safe-area-context\";\n\nclass MiddlePopup extends PureComponent {\n\trender() {\n\t\tconst bottom =\n\t\t\tPlatform.OS === \"android\" ? (this.props.insets?.bottom ?? 0) : 0;\n\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=\"fade\"\n\t\t\t\tonRequestClose={this.props.onClose}\n\t\t\t>\n\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\tbehavior={\n\t\t\t\t\t\tthis.props.keyboardAvoid && Platform.OS === \"ios\" && \"padding\"\n\t\t\t\t\t}\n\t\t\t\t\tstyle={styles.popup}\n\t\t\t\t>\n\t\t\t\t\t<TouchableWithoutFeedback onPress={this.props.onClose}>\n\t\t\t\t\t\t<View style={styles.popupOverlay} />\n\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\tstyles.popupContent,\n\t\t\t\t\t\t\tthis.props.style,\n\t\t\t\t\t\t\tbottom > 0 && { paddingBottom: bottom },\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.props.children}\n\t\t\t\t\t</View>\n\t\t\t\t</KeyboardAvoidingView>\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\talignItems: \"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: 12,\n\t\tbackgroundColor: \"#fff\",\n\t\talignItems: \"center\",\n\t},\n};\n\nconst MiddlePopupWithInsets = withSafeAreaInsets(MiddlePopup);\nexport { MiddlePopupWithInsets as MiddlePopup };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SACCC,IAAI,EACJC,KAAK,EACLC,wBAAwB,EACxBC,oBAAoB,EACpBC,QAAQ,QACF,cAAc;AACrB,SAASC,kBAAkB,QAAQ,gCAAgC;AAEnE,MAAMC,WAAW,SAASP,aAAa,CAAC;EACvCQ,MAAMA,CAAA,EAAG;IAAA,IAAAC,kBAAA;IACR,MAAMC,MAAM,GACXL,QAAQ,CAACM,EAAE,KAAK,SAAS,GAAI,EAAAF,kBAAA,OAAI,CAACG,KAAK,CAACC,MAAM,cAAAJ,kBAAA,uBAAjBA,kBAAA,CAAmBC,MAAM,KAAI,CAAC,GAAI,CAAC;IAEjE,oBACCX,KAAA,CAAAe,aAAA,CAACZ,KAAK;MACLa,OAAO,EAAE,IAAI,CAACH,KAAK,CAACG,OAAQ;MAC5BC,WAAW;MACXC,aAAa,E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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
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
4
|
+
import { Icon } from "@rneui/themed";
|
|
5
|
+
import { File, Paths } from "expo-file-system";
|
|
6
|
+
import * as Sharing from "expo-sharing";
|
|
7
|
+
import { Component } from "react";
|
|
8
|
+
import { Alert, Dimensions, Modal, TouchableOpacity, View } from "react-native";
|
|
9
|
+
import { WebView } from "react-native-webview";
|
|
10
|
+
import { TEXT_DARK, TEXT_LIGHT } from "../colours";
|
|
11
|
+
import { getFileName, StatusBarHeight } from "../helper";
|
|
12
|
+
import { FontAwesome } from "./Icon";
|
|
13
|
+
import { Spinner } from "./Spinner";
|
|
14
|
+
import { Text } from "./Text";
|
|
15
|
+
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
|
14
16
|
class PDFPopup extends Component {
|
|
15
17
|
constructor(...args) {
|
|
16
18
|
super(...args);
|
|
17
19
|
_defineProperty(this, "state", {
|
|
18
|
-
loaded: false
|
|
20
|
+
loaded: false,
|
|
21
|
+
error: false
|
|
19
22
|
});
|
|
20
23
|
_defineProperty(this, "download", async () => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
try {
|
|
25
|
+
const file = await File.downloadFileAsync(this.props.source, new File(Paths.document, getFileName(this.props.source)), {
|
|
26
|
+
idempotent: true
|
|
27
|
+
});
|
|
28
|
+
await Sharing.shareAsync(file.uri, {
|
|
29
|
+
UTI: "public.item"
|
|
30
|
+
});
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.log("PDFPopup download error:", error);
|
|
33
|
+
Alert.alert("Download Failed", "Unable to download PDF. Please try again.", [{
|
|
34
|
+
text: "OK"
|
|
35
|
+
}]);
|
|
36
|
+
}
|
|
25
37
|
});
|
|
26
38
|
}
|
|
39
|
+
componentDidUpdate(prevProps) {
|
|
40
|
+
const sourceChanged = prevProps.source !== this.props.source;
|
|
41
|
+
const becameVisible = !prevProps.visible && this.props.visible;
|
|
42
|
+
if (sourceChanged || becameVisible) {
|
|
43
|
+
// Popup is reused across attachments — clear stale state so the
|
|
44
|
+
// spinner reappears and any prior error from a different PDF resets.
|
|
45
|
+
clearTimeout(this._loadTimeout);
|
|
46
|
+
this._loadTimeout = null;
|
|
47
|
+
this.setState({
|
|
48
|
+
loaded: false,
|
|
49
|
+
error: false
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
componentWillUnmount() {
|
|
54
|
+
clearTimeout(this._loadTimeout);
|
|
55
|
+
this._loadTimeout = null;
|
|
56
|
+
}
|
|
27
57
|
onLoadStarted() {
|
|
28
58
|
this.setState({
|
|
29
|
-
loaded: false
|
|
59
|
+
loaded: false,
|
|
60
|
+
error: false
|
|
30
61
|
});
|
|
62
|
+
clearTimeout(this._loadTimeout);
|
|
63
|
+
this._loadTimeout = setTimeout(() => {
|
|
64
|
+
this.setState({
|
|
65
|
+
error: true
|
|
66
|
+
});
|
|
67
|
+
}, 15000);
|
|
31
68
|
}
|
|
32
69
|
onLoadEnded() {
|
|
70
|
+
clearTimeout(this._loadTimeout);
|
|
71
|
+
this._loadTimeout = null;
|
|
33
72
|
this.setState({
|
|
34
73
|
loaded: true
|
|
35
74
|
});
|
|
@@ -38,8 +77,11 @@ class PDFPopup extends Component {
|
|
|
38
77
|
this.props.onChangeIndex(index);
|
|
39
78
|
}
|
|
40
79
|
getUrl() {
|
|
41
|
-
|
|
42
|
-
|
|
80
|
+
if (!this.props.source) {
|
|
81
|
+
return "";
|
|
82
|
+
}
|
|
83
|
+
const linkPrefix = "https://drive.google.com/viewerng/viewer?embedded=true&url=";
|
|
84
|
+
return `${linkPrefix}${encodeURIComponent(this.props.source)}`;
|
|
43
85
|
}
|
|
44
86
|
closePopup() {
|
|
45
87
|
this.props.onClose();
|
|
@@ -80,7 +122,7 @@ class PDFPopup extends Component {
|
|
|
80
122
|
}, /*#__PURE__*/React.createElement(View, {
|
|
81
123
|
style: {
|
|
82
124
|
flex: 1,
|
|
83
|
-
backgroundColor:
|
|
125
|
+
backgroundColor: "#000",
|
|
84
126
|
paddingTop: StatusBarHeight(0)
|
|
85
127
|
}
|
|
86
128
|
}, /*#__PURE__*/React.createElement(View, {
|
|
@@ -88,8 +130,8 @@ class PDFPopup extends Component {
|
|
|
88
130
|
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
89
131
|
onPress: this.closePopup.bind(this),
|
|
90
132
|
activeOpacity: 0.6
|
|
91
|
-
}, /*#__PURE__*/React.createElement(
|
|
92
|
-
name: "
|
|
133
|
+
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
134
|
+
name: "x",
|
|
93
135
|
style: [styles.menuIcon]
|
|
94
136
|
})), /*#__PURE__*/React.createElement(View, {
|
|
95
137
|
style: styles.titleContainer
|
|
@@ -105,36 +147,61 @@ class PDFPopup extends Component {
|
|
|
105
147
|
}))), /*#__PURE__*/React.createElement(View, {
|
|
106
148
|
style: {
|
|
107
149
|
flex: 1,
|
|
108
|
-
backgroundColor:
|
|
150
|
+
backgroundColor: "#fff"
|
|
109
151
|
}
|
|
110
|
-
}, this.state.
|
|
152
|
+
}, this.state.error ? /*#__PURE__*/React.createElement(View, {
|
|
153
|
+
style: styles.errorContainer
|
|
154
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
155
|
+
style: styles.errorTitle
|
|
156
|
+
}, "Unable to load this PDF."), /*#__PURE__*/React.createElement(Text, {
|
|
157
|
+
style: styles.errorSubtitle
|
|
158
|
+
}, "Try downloading it instead."), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
159
|
+
onPress: this.download,
|
|
160
|
+
activeOpacity: 0.6,
|
|
161
|
+
style: styles.errorDownloadButton
|
|
162
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
163
|
+
type: "font-awesome",
|
|
164
|
+
name: "cloud-download",
|
|
165
|
+
iconStyle: styles.errorDownloadIcon
|
|
166
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
167
|
+
style: styles.errorDownloadText
|
|
168
|
+
}, "Download PDF"))) : /*#__PURE__*/React.createElement(React.Fragment, null, this.state.loaded ? null : /*#__PURE__*/React.createElement(Spinner, {
|
|
111
169
|
style: {
|
|
112
170
|
height: SCREEN_HEIGHT - StatusBarHeight(145),
|
|
113
171
|
flex: 0
|
|
114
172
|
}
|
|
115
173
|
}), /*#__PURE__*/React.createElement(WebView, {
|
|
116
|
-
ref: "PDFWebView",
|
|
117
174
|
source: {
|
|
118
175
|
uri: this.getUrl()
|
|
119
176
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
177
|
+
javaScriptEnabled: true,
|
|
178
|
+
domStorageEnabled: true,
|
|
179
|
+
originWhitelist: ["*"],
|
|
180
|
+
renderError: () => {
|
|
181
|
+
// Surface error UI in the parent View rather than the
|
|
182
|
+
// default WebView error chrome. Defer setState to avoid
|
|
183
|
+
// triggering a state update during another render.
|
|
184
|
+
if (!this.state.error) {
|
|
185
|
+
setTimeout(() => this.setState({
|
|
186
|
+
error: true
|
|
187
|
+
}), 0);
|
|
188
|
+
}
|
|
189
|
+
return null;
|
|
123
190
|
},
|
|
124
191
|
style: [{
|
|
125
192
|
flex: 1,
|
|
126
|
-
backgroundColor:
|
|
193
|
+
backgroundColor: "#fff"
|
|
127
194
|
}],
|
|
128
195
|
onLoadStart: this.onLoadStarted.bind(this),
|
|
129
196
|
onLoadEnd: this.onLoadEnded.bind(this)
|
|
130
|
-
})), this.renderFooter()));
|
|
197
|
+
}))), this.renderFooter()));
|
|
131
198
|
}
|
|
132
199
|
}
|
|
133
200
|
const styles = {
|
|
134
201
|
container: {
|
|
135
202
|
flex: 1,
|
|
136
|
-
position:
|
|
137
|
-
backgroundColor:
|
|
203
|
+
position: "relative",
|
|
204
|
+
backgroundColor: "#000"
|
|
138
205
|
},
|
|
139
206
|
innerContainer: {
|
|
140
207
|
flex: 1,
|
|
@@ -145,28 +212,28 @@ const styles = {
|
|
|
145
212
|
fontSize: 25,
|
|
146
213
|
padding: 15,
|
|
147
214
|
width: 55,
|
|
148
|
-
textAlign:
|
|
149
|
-
color:
|
|
215
|
+
textAlign: "center",
|
|
216
|
+
color: "#fff",
|
|
150
217
|
zIndex: 3
|
|
151
218
|
},
|
|
152
219
|
headerContent: {
|
|
153
|
-
flexDirection:
|
|
154
|
-
alignItems:
|
|
220
|
+
flexDirection: "row",
|
|
221
|
+
alignItems: "center",
|
|
155
222
|
height: 70
|
|
156
223
|
},
|
|
157
224
|
titleContainer: {
|
|
158
225
|
flex: 1
|
|
159
226
|
},
|
|
160
227
|
title: {
|
|
161
|
-
color:
|
|
162
|
-
fontFamily:
|
|
228
|
+
color: "#fff",
|
|
229
|
+
fontFamily: "sf-semibold",
|
|
163
230
|
fontSize: 16,
|
|
164
|
-
textAlign:
|
|
231
|
+
textAlign: "center"
|
|
165
232
|
},
|
|
166
233
|
footerContent: {
|
|
167
|
-
flexDirection:
|
|
168
|
-
alignItems:
|
|
169
|
-
justifyContent:
|
|
234
|
+
flexDirection: "row",
|
|
235
|
+
alignItems: "center",
|
|
236
|
+
justifyContent: "center",
|
|
170
237
|
height: 70
|
|
171
238
|
//alignSelf: 'flex-end'
|
|
172
239
|
},
|
|
@@ -174,16 +241,55 @@ const styles = {
|
|
|
174
241
|
fontSize: 25,
|
|
175
242
|
padding: 15,
|
|
176
243
|
width: 55,
|
|
177
|
-
textAlign:
|
|
178
|
-
color:
|
|
244
|
+
textAlign: "center",
|
|
245
|
+
color: "#fff",
|
|
179
246
|
zIndex: 3
|
|
180
247
|
},
|
|
181
248
|
footerText: {
|
|
182
|
-
fontFamily:
|
|
249
|
+
fontFamily: "sf-regular",
|
|
183
250
|
fontSize: 14,
|
|
184
|
-
color:
|
|
251
|
+
color: "#fff",
|
|
185
252
|
width: 150,
|
|
186
|
-
textAlign:
|
|
253
|
+
textAlign: "center"
|
|
254
|
+
},
|
|
255
|
+
errorContainer: {
|
|
256
|
+
flex: 1,
|
|
257
|
+
alignItems: "center",
|
|
258
|
+
justifyContent: "center",
|
|
259
|
+
paddingHorizontal: 32,
|
|
260
|
+
paddingVertical: 24,
|
|
261
|
+
backgroundColor: "#fff"
|
|
262
|
+
},
|
|
263
|
+
errorTitle: {
|
|
264
|
+
fontFamily: "sf-semibold",
|
|
265
|
+
fontSize: 18,
|
|
266
|
+
color: TEXT_DARK,
|
|
267
|
+
textAlign: "center"
|
|
268
|
+
},
|
|
269
|
+
errorSubtitle: {
|
|
270
|
+
fontFamily: "sf-regular",
|
|
271
|
+
fontSize: 14,
|
|
272
|
+
color: TEXT_LIGHT,
|
|
273
|
+
textAlign: "center",
|
|
274
|
+
marginTop: 8
|
|
275
|
+
},
|
|
276
|
+
errorDownloadButton: {
|
|
277
|
+
flexDirection: "row",
|
|
278
|
+
alignItems: "center",
|
|
279
|
+
justifyContent: "center",
|
|
280
|
+
marginTop: 24,
|
|
281
|
+
paddingHorizontal: 20,
|
|
282
|
+
paddingVertical: 12
|
|
283
|
+
},
|
|
284
|
+
errorDownloadIcon: {
|
|
285
|
+
fontSize: 20,
|
|
286
|
+
color: TEXT_DARK,
|
|
287
|
+
marginRight: 8
|
|
288
|
+
},
|
|
289
|
+
errorDownloadText: {
|
|
290
|
+
fontFamily: "sf-semibold",
|
|
291
|
+
fontSize: 16,
|
|
292
|
+
color: TEXT_DARK
|
|
187
293
|
}
|
|
188
294
|
};
|
|
189
295
|
export { PDFPopup };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","View","Text","TouchableOpacity","Modal","Dimensions","Icon","WebView","FileSystem","Sharing","Pl60Icon","Spinner","StatusBarHeight","getFileName","SCREEN_HEIGHT","get","height","PDFPopup","constructor","args","_defineProperty","loaded","downloadedFile","downloadAsync","props","source","documentDirectory","shareResult","shareAsync","uri","UTI","onLoadStarted","setState","onLoadEnded","onChangeIndex","index","getUrl","linkPrefix","closePopup","onClose","renderFooter","pdfCount","createElement","style","styles","footerContent","onPress","bind","activeOpacity","type","name","iconStyle","chevron","footerText","selectedIndex","render","visible","transparent","animationType","onRequestClose","flex","backgroundColor","paddingTop","headerContent","menuIcon","titleContainer","title","download","state","ref","renderError","e","console","log","onLoadStart","onLoadEnd","container","position","innerContainer","paddingLeft","paddingRight","fontSize","padding","width","textAlign","color","zIndex","flexDirection","alignItems","fontFamily","justifyContent"],"sources":["PDFPopup.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { View, Text, TouchableOpacity, Modal, Dimensions } from 'react-native';\nimport { Icon } from '@rneui/themed';\nimport { WebView } from 'react-native-webview';\nimport * as FileSystem from 'expo-file-system';\nimport * as Sharing from 'expo-sharing';\nimport { Pl60Icon } from '../fonts';\nimport { Spinner } from './Spinner';\nimport { StatusBarHeight, getFileName } from '../helper';\n\nconst SCREEN_HEIGHT = Dimensions.get('window').height;\n\nclass PDFPopup extends Component {\n state = {\n loaded: false,\n };\n\n onLoadStarted() {\n this.setState({\n loaded: false,\n });\n }\n\n onLoadEnded() {\n this.setState({\n loaded: true,\n });\n }\n\n onChangeIndex(index) {\n this.props.onChangeIndex(index);\n }\n\n getUrl() {\n const linkPrefix = 'http://drive.google.com/viewerng/viewer?embedded=true&url=';\n return `${linkPrefix}${this.props.source}`;\n }\n\n download = async () => {\n const downloadedFile = await FileSystem.downloadAsync(this.props.source, FileSystem.documentDirectory + getFileName(this.props.source));\n const shareResult = await Sharing.shareAsync(downloadedFile.uri, { UTI: 'public.item' });\n };\n\n closePopup() {\n this.props.onClose();\n }\n\n renderFooter() {\n if (this.props.pdfCount && this.props.pdfCount === 1) {\n return null;\n }\n return (\n <View style={styles.footerContent}>\n <TouchableOpacity onPress={this.onChangeIndex.bind(this, -1)} activeOpacity={0.6}>\n <Icon type=\"font-awesome\" name=\"angle-left\" iconStyle={[styles.chevron]} />\n </TouchableOpacity>\n <Text style={styles.footerText}>\n {this.props.selectedIndex + 1} / {this.props.pdfCount}\n </Text>\n <TouchableOpacity onPress={this.onChangeIndex.bind(this, 1)} activeOpacity={0.6}>\n <Icon type=\"font-awesome\" name=\"angle-right\" iconStyle={[styles.chevron]} />\n </TouchableOpacity>\n </View>\n );\n }\n\n render() {\n if (!this.props.source) {\n return null;\n }\n return (\n <Modal visible={this.props.visible} transparent animationType=\"slide\" onRequestClose={this.closePopup.bind(this)}>\n <View\n style={{\n flex: 1,\n backgroundColor: '#000',\n paddingTop: StatusBarHeight(0),\n }}\n >\n <View style={styles.headerContent}>\n <TouchableOpacity onPress={this.closePopup.bind(this)} activeOpacity={0.6}>\n <Pl60Icon name=\"close\" style={[styles.menuIcon]} />\n </TouchableOpacity>\n <View style={styles.titleContainer}>\n <Text style={styles.title}>{this.props.title}</Text>\n </View>\n <TouchableOpacity onPress={this.download} activeOpacity={0.6}>\n <Icon type=\"font-awesome\" name=\"cloud-download\" iconStyle={[styles.menuIcon]} />\n </TouchableOpacity>\n </View>\n <View style={{ flex: 1, backgroundColor: '#fff' }}>\n {this.state.loaded ? null : <Spinner style={{ height: SCREEN_HEIGHT - StatusBarHeight(145), flex: 0 }} />}\n <WebView\n ref=\"PDFWebView\"\n source={{\n uri: this.getUrl(),\n }}\n renderError={e => {\n console.log('errored');\n console.log(e);\n }}\n style={[\n {\n flex: 1,\n backgroundColor: '#fff',\n },\n ]}\n onLoadStart={this.onLoadStarted.bind(this)}\n onLoadEnd={this.onLoadEnded.bind(this)}\n />\n </View>\n {this.renderFooter()}\n </View>\n </Modal>\n );\n }\n}\n\nconst styles = {\n container: {\n flex: 1,\n position: 'relative',\n backgroundColor: '#000',\n },\n innerContainer: {\n flex: 1,\n paddingLeft: 15,\n paddingRight: 15,\n },\n menuIcon: {\n fontSize: 25,\n padding: 15,\n width: 55,\n textAlign: 'center',\n color: '#fff',\n zIndex: 3,\n },\n headerContent: {\n flexDirection: 'row',\n alignItems: 'center',\n height: 70,\n },\n titleContainer: {\n flex: 1,\n },\n title: {\n color: '#fff',\n fontFamily: 'sf-semibold',\n fontSize: 16,\n textAlign: 'center',\n },\n footerContent: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n height: 70,\n //alignSelf: 'flex-end'\n },\n chevron: {\n fontSize: 25,\n padding: 15,\n width: 55,\n textAlign: 'center',\n color: '#fff',\n zIndex: 3,\n },\n footerText: {\n fontFamily: 'sf-regular',\n fontSize: 14,\n color: '#fff',\n width: 150,\n textAlign: 'center',\n },\n};\n\nexport { PDFPopup };\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,UAAU,QAAQ,cAAc;AAC9E,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,OAAO,KAAKC,UAAU,MAAM,kBAAkB;AAC9C,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,QAAQ,QAAQ,UAAU;AACnC,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,eAAe,EAAEC,WAAW,QAAQ,WAAW;AAExD,MAAMC,aAAa,GAAGT,UAAU,CAACU,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM;AAErD,MAAMC,QAAQ,SAASjB,SAAS,CAAC;EAAAkB,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,gB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U,EAAE,QAAQ;IACpBE,cAAc,EAAE,QAAQ;IACxB1E,MAAM,EAAE;IACR;EACF,CAAC;EACDoC,OAAO,EAAE;IACP6B,QAAQ,EAAE,EAAE;IACZC,OAAO,EAAE,EAAE;IACXC,KAAK,EAAE,EAAE;IACTC,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDjC,UAAU,EAAE;IACVoC,UAAU,EAAE,YAAY;IACxBR,QAAQ,EAAE,EAAE;IACZI,KAAK,EAAE,MAAM;IACbF,KAAK,EAAE,GAAG;IACVC,SAAS,EAAE;EACb;AACF,CAAC;AAED,SAASnE,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Icon","File","Paths","Sharing","Component","Alert","Dimensions","Modal","TouchableOpacity","View","WebView","TEXT_DARK","TEXT_LIGHT","getFileName","StatusBarHeight","FontAwesome","Spinner","Text","SCREEN_HEIGHT","get","height","PDFPopup","constructor","args","_defineProperty","loaded","error","file","downloadFileAsync","props","source","document","idempotent","shareAsync","uri","UTI","console","log","alert","text","componentDidUpdate","prevProps","sourceChanged","becameVisible","visible","clearTimeout","_loadTimeout","setState","componentWillUnmount","onLoadStarted","setTimeout","onLoadEnded","onChangeIndex","index","getUrl","linkPrefix","encodeURIComponent","closePopup","onClose","renderFooter","pdfCount","React","createElement","style","styles","footerContent","onPress","bind","activeOpacity","type","name","iconStyle","chevron","footerText","selectedIndex","render","transparent","animationType","onRequestClose","flex","backgroundColor","paddingTop","headerContent","menuIcon","titleContainer","title","download","state","errorContainer","errorTitle","errorSubtitle","errorDownloadButton","errorDownloadIcon","errorDownloadText","Fragment","javaScriptEnabled","domStorageEnabled","originWhitelist","renderError","onLoadStart","onLoadEnd","container","position","innerContainer","paddingLeft","paddingRight","fontSize","padding","width","textAlign","color","zIndex","flexDirection","alignItems","fontFamily","justifyContent","paddingHorizontal","paddingVertical","marginTop","marginRight"],"sources":["PDFPopup.js"],"sourcesContent":["import { Icon } from \"@rneui/themed\";\nimport { File, Paths } from \"expo-file-system\";\nimport * as Sharing from \"expo-sharing\";\nimport { Component } from \"react\";\nimport { Alert, Dimensions, Modal, TouchableOpacity, View } from \"react-native\";\nimport { WebView } from \"react-native-webview\";\nimport { TEXT_DARK, TEXT_LIGHT } from \"../colours\";\nimport { getFileName, StatusBarHeight } from \"../helper\";\nimport { FontAwesome } from \"./Icon\";\nimport { Spinner } from \"./Spinner\";\nimport { Text } from \"./Text\";\n\nconst SCREEN_HEIGHT = Dimensions.get(\"window\").height;\n\nclass PDFPopup extends Component {\n\tstate = {\n\t\tloaded: false,\n\t\terror: false,\n\t};\n\n\tcomponentDidUpdate(prevProps) {\n\t\tconst sourceChanged = prevProps.source !== this.props.source;\n\t\tconst becameVisible = !prevProps.visible && this.props.visible;\n\t\tif (sourceChanged || becameVisible) {\n\t\t\t// Popup is reused across attachments — clear stale state so the\n\t\t\t// spinner reappears and any prior error from a different PDF resets.\n\t\t\tclearTimeout(this._loadTimeout);\n\t\t\tthis._loadTimeout = null;\n\t\t\tthis.setState({ loaded: false, error: false });\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout(this._loadTimeout);\n\t\tthis._loadTimeout = null;\n\t}\n\n\tonLoadStarted() {\n\t\tthis.setState({\n\t\t\tloaded: false,\n\t\t\terror: false,\n\t\t});\n\t\tclearTimeout(this._loadTimeout);\n\t\tthis._loadTimeout = setTimeout(() => {\n\t\t\tthis.setState({ error: true });\n\t\t}, 15000);\n\t}\n\n\tonLoadEnded() {\n\t\tclearTimeout(this._loadTimeout);\n\t\tthis._loadTimeout = null;\n\t\tthis.setState({\n\t\t\tloaded: true,\n\t\t});\n\t}\n\n\tonChangeIndex(index) {\n\t\tthis.props.onChangeIndex(index);\n\t}\n\n\tgetUrl() {\n\t\tif (!this.props.source) {\n\t\t\treturn \"\";\n\t\t}\n\t\tconst linkPrefix =\n\t\t\t\"https://drive.google.com/viewerng/viewer?embedded=true&url=\";\n\t\treturn `${linkPrefix}${encodeURIComponent(this.props.source)}`;\n\t}\n\n\tdownload = async () => {\n\t\ttry {\n\t\t\tconst file = await File.downloadFileAsync(\n\t\t\t\tthis.props.source,\n\t\t\t\tnew File(Paths.document, getFileName(this.props.source)),\n\t\t\t\t{ idempotent: true },\n\t\t\t);\n\t\t\tawait Sharing.shareAsync(file.uri, {\n\t\t\t\tUTI: \"public.item\",\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconsole.log(\"PDFPopup download error:\", error);\n\t\t\tAlert.alert(\n\t\t\t\t\"Download Failed\",\n\t\t\t\t\"Unable to download PDF. Please try again.\",\n\t\t\t\t[{ text: \"OK\" }],\n\t\t\t);\n\t\t}\n\t};\n\n\tclosePopup() {\n\t\tthis.props.onClose();\n\t}\n\n\trenderFooter() {\n\t\tif (this.props.pdfCount && this.props.pdfCount === 1) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={styles.footerContent}>\n\t\t\t\t<TouchableOpacity\n\t\t\t\t\tonPress={this.onChangeIndex.bind(this, -1)}\n\t\t\t\t\tactiveOpacity={0.6}\n\t\t\t\t>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\tname=\"angle-left\"\n\t\t\t\t\t\ticonStyle={[styles.chevron]}\n\t\t\t\t\t/>\n\t\t\t\t</TouchableOpacity>\n\t\t\t\t<Text style={styles.footerText}>\n\t\t\t\t\t{this.props.selectedIndex + 1} / {this.props.pdfCount}\n\t\t\t\t</Text>\n\t\t\t\t<TouchableOpacity\n\t\t\t\t\tonPress={this.onChangeIndex.bind(this, 1)}\n\t\t\t\t\tactiveOpacity={0.6}\n\t\t\t\t>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\tname=\"angle-right\"\n\t\t\t\t\t\ticonStyle={[styles.chevron]}\n\t\t\t\t\t/>\n\t\t\t\t</TouchableOpacity>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.props.source) {\n\t\t\treturn null;\n\t\t}\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.closePopup.bind(this)}\n\t\t\t>\n\t\t\t\t<View\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\tbackgroundColor: \"#000\",\n\t\t\t\t\t\tpaddingTop: StatusBarHeight(0),\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<View style={styles.headerContent}>\n\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\tonPress={this.closePopup.bind(this)}\n\t\t\t\t\t\t\tactiveOpacity={0.6}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FontAwesome name=\"x\" style={[styles.menuIcon]} />\n\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t<View style={styles.titleContainer}>\n\t\t\t\t\t\t\t<Text style={styles.title}>{this.props.title}</Text>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t<TouchableOpacity onPress={this.download} activeOpacity={0.6}>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\t\tname=\"cloud-download\"\n\t\t\t\t\t\t\t\ticonStyle={[styles.menuIcon]}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t</View>\n\t\t\t\t\t<View style={{ flex: 1, backgroundColor: \"#fff\" }}>\n\t\t\t\t\t\t{this.state.error ? (\n\t\t\t\t\t\t\t<View style={styles.errorContainer}>\n\t\t\t\t\t\t\t\t<Text style={styles.errorTitle}>Unable to load this PDF.</Text>\n\t\t\t\t\t\t\t\t<Text style={styles.errorSubtitle}>\n\t\t\t\t\t\t\t\t\tTry downloading it instead.\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\tonPress={this.download}\n\t\t\t\t\t\t\t\t\tactiveOpacity={0.6}\n\t\t\t\t\t\t\t\t\tstyle={styles.errorDownloadButton}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\t\t\t\tname=\"cloud-download\"\n\t\t\t\t\t\t\t\t\t\ticonStyle={styles.errorDownloadIcon}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Text style={styles.errorDownloadText}>Download PDF</Text>\n\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{this.state.loaded ? null : (\n\t\t\t\t\t\t\t\t\t<Spinner\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\theight: SCREEN_HEIGHT - StatusBarHeight(145),\n\t\t\t\t\t\t\t\t\t\t\tflex: 0,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\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<WebView\n\t\t\t\t\t\t\t\t\tsource={{\n\t\t\t\t\t\t\t\t\t\turi: this.getUrl(),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tjavaScriptEnabled\n\t\t\t\t\t\t\t\t\tdomStorageEnabled\n\t\t\t\t\t\t\t\t\toriginWhitelist={[\"*\"]}\n\t\t\t\t\t\t\t\t\trenderError={() => {\n\t\t\t\t\t\t\t\t\t\t// Surface error UI in the parent View rather than the\n\t\t\t\t\t\t\t\t\t\t// default WebView error chrome. Defer setState to avoid\n\t\t\t\t\t\t\t\t\t\t// triggering a state update during another render.\n\t\t\t\t\t\t\t\t\t\tif (!this.state.error) {\n\t\t\t\t\t\t\t\t\t\t\tsetTimeout(() => this.setState({ error: true }), 0);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: \"#fff\",\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\tonLoadStart={this.onLoadStarted.bind(this)}\n\t\t\t\t\t\t\t\t\tonLoadEnd={this.onLoadEnded.bind(this)}\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</View>\n\t\t\t\t\t{this.renderFooter()}\n\t\t\t\t</View>\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tcontainer: {\n\t\tflex: 1,\n\t\tposition: \"relative\",\n\t\tbackgroundColor: \"#000\",\n\t},\n\tinnerContainer: {\n\t\tflex: 1,\n\t\tpaddingLeft: 15,\n\t\tpaddingRight: 15,\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\theaderContent: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\theight: 70,\n\t},\n\ttitleContainer: {\n\t\tflex: 1,\n\t},\n\ttitle: {\n\t\tcolor: \"#fff\",\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 16,\n\t\ttextAlign: \"center\",\n\t},\n\tfooterContent: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\theight: 70,\n\t\t//alignSelf: 'flex-end'\n\t},\n\tchevron: {\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\tfooterText: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 14,\n\t\tcolor: \"#fff\",\n\t\twidth: 150,\n\t\ttextAlign: \"center\",\n\t},\n\terrorContainer: {\n\t\tflex: 1,\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\tpaddingHorizontal: 32,\n\t\tpaddingVertical: 24,\n\t\tbackgroundColor: \"#fff\",\n\t},\n\terrorTitle: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 18,\n\t\tcolor: TEXT_DARK,\n\t\ttextAlign: \"center\",\n\t},\n\terrorSubtitle: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 14,\n\t\tcolor: TEXT_LIGHT,\n\t\ttextAlign: \"center\",\n\t\tmarginTop: 8,\n\t},\n\terrorDownloadButton: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\tmarginTop: 24,\n\t\tpaddingHorizontal: 20,\n\t\tpaddingVertical: 12,\n\t},\n\terrorDownloadIcon: {\n\t\tfontSize: 20,\n\t\tcolor: TEXT_DARK,\n\t\tmarginRight: 8,\n\t},\n\terrorDownloadText: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 16,\n\t\tcolor: TEXT_DARK,\n\t},\n};\n\nexport { PDFPopup };\n"],"mappings":";;;AAAA,SAASA,IAAI,QAAQ,eAAe;AACpC,SAASC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;AAC9C,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,KAAK,EAAEC,UAAU,EAAEC,KAAK,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC/E,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,SAAS,EAAEC,UAAU,QAAQ,Y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