@plusscommunities/pluss-core-app 8.0.29 → 8.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/actions/FollowerActions.js +34 -0
- package/dist/module/actions/FollowerActions.js.map +1 -0
- package/dist/module/actions/MediaActions.js +29 -0
- package/dist/module/actions/MediaActions.js.map +1 -0
- package/dist/module/actions/ResidentActions.js +26 -0
- package/dist/module/actions/ResidentActions.js.map +1 -0
- package/dist/module/actions/UserActions.js +223 -0
- package/dist/module/actions/UserActions.js.map +1 -0
- package/dist/module/actions/UserSettingsActions.js +14 -0
- package/dist/module/actions/UserSettingsActions.js.map +1 -0
- package/dist/module/actions/index.js +6 -0
- package/dist/module/actions/index.js.map +1 -0
- package/dist/module/actions/types.js +17 -0
- package/dist/module/actions/types.js.map +1 -0
- package/dist/module/apis/analyticsActions.js +20 -0
- package/dist/module/apis/analyticsActions.js.map +1 -0
- package/dist/module/apis/contactActions.js +27 -0
- package/dist/module/apis/contactActions.js.map +1 -0
- package/dist/module/apis/eventActions.js +161 -0
- package/dist/module/apis/eventActions.js.map +1 -0
- package/dist/module/apis/fileActions.js +93 -0
- package/dist/module/apis/fileActions.js.map +1 -0
- package/dist/module/apis/followerActions.js +38 -0
- package/dist/module/apis/followerActions.js.map +1 -0
- package/dist/module/apis/index.js +13 -0
- package/dist/module/apis/index.js.map +1 -0
- package/dist/module/apis/notificationActions.js +60 -0
- package/dist/module/apis/notificationActions.js.map +1 -0
- package/dist/module/apis/profileActions.js +14 -0
- package/dist/module/apis/profileActions.js.map +1 -0
- package/dist/module/apis/reactionActions.js +76 -0
- package/dist/module/apis/reactionActions.js.map +1 -0
- package/dist/module/apis/settingActions.js +22 -0
- package/dist/module/apis/settingActions.js.map +1 -0
- package/dist/module/apis/stringActions.js +30 -0
- package/dist/module/apis/stringActions.js.map +1 -0
- package/dist/module/apis/typeActions.js +15 -0
- package/dist/module/apis/typeActions.js.map +1 -0
- package/dist/module/apis/userActions.js +104 -0
- package/dist/module/apis/userActions.js.map +1 -0
- 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/assets/icons/reactions/heart.png +0 -0
- package/dist/module/assets/icons/reactions/party.png +0 -0
- package/dist/module/assets/icons/reactions/sad.png +0 -0
- package/dist/module/assets/icons/reactions/smile.png +0 -0
- package/dist/module/colours.js +165 -0
- package/dist/module/colours.js.map +1 -0
- package/dist/module/components/AddButton.js +43 -0
- package/dist/module/components/AddButton.js.map +1 -0
- package/dist/module/components/AddToCalendarButton.js +225 -0
- package/dist/module/components/AddToCalendarButton.js.map +1 -0
- package/dist/module/components/Attachment.js +55 -0
- package/dist/module/components/Attachment.js.map +1 -0
- package/dist/module/components/AudienceSelectorLauncher.js +64 -0
- package/dist/module/components/AudienceSelectorLauncher.js.map +1 -0
- package/dist/module/components/AudienceSelectorPage.js +351 -0
- package/dist/module/components/AudienceSelectorPage.js.map +1 -0
- package/dist/module/components/AutoOffsetImage.js +184 -0
- package/dist/module/components/AutoOffsetImage.js.map +1 -0
- package/dist/module/components/BackButton.js +58 -0
- package/dist/module/components/BackButton.js.map +1 -0
- package/dist/module/components/CalendarPopup.js +126 -0
- package/dist/module/components/CalendarPopup.js.map +1 -0
- package/dist/module/components/CategoryTabs.js +155 -0
- package/dist/module/components/CategoryTabs.js.map +1 -0
- package/dist/module/components/CommentReply.js +334 -0
- package/dist/module/components/CommentReply.js.map +1 -0
- package/dist/module/components/CommentSection.js +823 -0
- package/dist/module/components/CommentSection.js.map +1 -0
- package/dist/module/components/ConfirmPopup.js +109 -0
- package/dist/module/components/ConfirmPopup.js.map +1 -0
- package/dist/module/components/ConfirmationPopup.js +72 -0
- package/dist/module/components/ConfirmationPopup.js.map +1 -0
- package/dist/module/components/DocumentUploader.js +253 -0
- package/dist/module/components/DocumentUploader.js.map +1 -0
- package/dist/module/components/DropDownItem.js +75 -0
- package/dist/module/components/DropDownItem.js.map +1 -0
- package/dist/module/components/DropDownMenu.js +41 -0
- package/dist/module/components/DropDownMenu.js.map +1 -0
- package/dist/module/components/EmptyStateMain.js +51 -0
- package/dist/module/components/EmptyStateMain.js.map +1 -0
- package/dist/module/components/EmptyStateWidget.js +48 -0
- package/dist/module/components/EmptyStateWidget.js.map +1 -0
- package/dist/module/components/FontScaleButton.js +37 -0
- package/dist/module/components/FontScaleButton.js.map +1 -0
- package/dist/module/components/FontScalePopup.js +76 -0
- package/dist/module/components/FontScalePopup.js.map +1 -0
- package/dist/module/components/Forbidden.js +58 -0
- package/dist/module/components/Forbidden.js.map +1 -0
- package/dist/module/components/FormCard.js +25 -0
- package/dist/module/components/FormCard.js.map +1 -0
- package/dist/module/components/FormCardSection.js +214 -0
- package/dist/module/components/FormCardSection.js.map +1 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js +73 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -0
- package/dist/module/components/FormattedText.js +133 -0
- package/dist/module/components/FormattedText.js.map +1 -0
- package/dist/module/components/GenericInput.js +151 -0
- package/dist/module/components/GenericInput.js.map +1 -0
- package/dist/module/components/GenericInputSection.js +173 -0
- package/dist/module/components/GenericInputSection.js.map +1 -0
- package/dist/module/components/Header.js +459 -0
- package/dist/module/components/Header.js.map +1 -0
- package/dist/module/components/Icon.js +109 -0
- package/dist/module/components/Icon.js.map +1 -0
- package/dist/module/components/ImagePopup.js +400 -0
- package/dist/module/components/ImagePopup.js.map +1 -0
- package/dist/module/components/ImageUploadProgress.js +69 -0
- package/dist/module/components/ImageUploadProgress.js.map +1 -0
- package/dist/module/components/ImageUploader.js +831 -0
- package/dist/module/components/ImageUploader.js.map +1 -0
- package/dist/module/components/InlineButton.js +66 -0
- package/dist/module/components/InlineButton.js.map +1 -0
- package/dist/module/components/Input.js +156 -0
- package/dist/module/components/Input.js.map +1 -0
- package/dist/module/components/LoadingCircles.js +219 -0
- package/dist/module/components/LoadingCircles.js.map +1 -0
- package/dist/module/components/LoadingIndicator.js +86 -0
- package/dist/module/components/LoadingIndicator.js.map +1 -0
- package/dist/module/components/LoadingStateWidget.js +46 -0
- package/dist/module/components/LoadingStateWidget.js.map +1 -0
- package/dist/module/components/MediaPlayer.js +407 -0
- package/dist/module/components/MediaPlayer.js.map +1 -0
- package/dist/module/components/MiddlePopup.js +49 -0
- package/dist/module/components/MiddlePopup.js.map +1 -0
- package/dist/module/components/PDFPopup.js +296 -0
- package/dist/module/components/PDFPopup.js.map +1 -0
- package/dist/module/components/PlussChat.js +1078 -0
- package/dist/module/components/PlussChat.js.map +1 -0
- package/dist/module/components/PlussChatMessage.js +299 -0
- package/dist/module/components/PlussChatMessage.js.map +1 -0
- package/dist/module/components/PlussChatTime.js +59 -0
- package/dist/module/components/PlussChatTime.js.map +1 -0
- package/dist/module/components/Popup.js +126 -0
- package/dist/module/components/Popup.js.map +1 -0
- package/dist/module/components/PopupMenu.js +120 -0
- package/dist/module/components/PopupMenu.js.map +1 -0
- package/dist/module/components/PositionedImage.js +313 -0
- package/dist/module/components/PositionedImage.js.map +1 -0
- package/dist/module/components/ProfilePic.js +105 -0
- package/dist/module/components/ProfilePic.js.map +1 -0
- package/dist/module/components/RadioButton.js +78 -0
- package/dist/module/components/RadioButton.js.map +1 -0
- package/dist/module/components/Reaction.js +117 -0
- package/dist/module/components/Reaction.js.map +1 -0
- package/dist/module/components/Reactions.js +71 -0
- package/dist/module/components/Reactions.js.map +1 -0
- package/dist/module/components/SharingTools.js +189 -0
- package/dist/module/components/SharingTools.js.map +1 -0
- package/dist/module/components/Spinner.js +22 -0
- package/dist/module/components/Spinner.js.map +1 -0
- package/dist/module/components/StickyFooter.js +34 -0
- package/dist/module/components/StickyFooter.js.map +1 -0
- package/dist/module/components/Text.js +57 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/TickIcon.js +24 -0
- package/dist/module/components/TickIcon.js.map +1 -0
- package/dist/module/components/Toggle.js +66 -0
- package/dist/module/components/Toggle.js.map +1 -0
- package/dist/module/components/TouchableSearchBar.js +68 -0
- package/dist/module/components/TouchableSearchBar.js.map +1 -0
- package/dist/module/components/UserListPopup.js +136 -0
- package/dist/module/components/UserListPopup.js.map +1 -0
- package/dist/module/components/UserListing.js +268 -0
- package/dist/module/components/UserListing.js.map +1 -0
- package/dist/module/components/VideoPopup.js +113 -0
- package/dist/module/components/VideoPopup.js.map +1 -0
- package/dist/module/components/WarningPopup.js +85 -0
- package/dist/module/components/WarningPopup.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +289 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +117 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -0
- package/dist/module/components/index.js +60 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +422 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +387 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -0
- package/dist/module/config.js +27 -0
- package/dist/module/config.js.map +1 -0
- package/dist/module/constants.js +18 -0
- package/dist/module/constants.js.map +1 -0
- package/dist/module/helper.js +424 -0
- package/dist/module/helper.js.map +1 -0
- package/dist/module/index.js +13 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/js/images/detectFaces.js +31 -0
- package/dist/module/js/images/detectFaces.js.map +1 -0
- package/dist/module/js/images/findLandmarkRange.js +93 -0
- package/dist/module/js/images/findLandmarkRange.js.map +1 -0
- package/dist/module/js/images/getScaledOffset.js +81 -0
- package/dist/module/js/images/getScaledOffset.js.map +1 -0
- package/dist/module/js/site/getSiteLevelFromState.js +29 -0
- package/dist/module/js/site/getSiteLevelFromState.js.map +1 -0
- package/dist/module/js/site/isTVEnabled.js +10 -0
- package/dist/module/js/site/isTVEnabled.js.map +1 -0
- package/dist/module/session.js +58 -0
- package/dist/module/session.js.map +1 -0
- package/dist/module/styles.js +67 -0
- package/dist/module/styles.js.map +1 -0
- package/dist/module/withNavigationFocus.js +30 -0
- package/dist/module/withNavigationFocus.js.map +1 -0
- package/package.json +1 -1
- package/src/components/PDFPopup.js +130 -35
|
@@ -0,0 +1,49 @@
|
|
|
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";
|
|
4
|
+
class MiddlePopup extends PureComponent {
|
|
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;
|
|
8
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
9
|
+
visible: this.props.visible,
|
|
10
|
+
transparent: true,
|
|
11
|
+
animationType: "fade",
|
|
12
|
+
onRequestClose: this.props.onClose
|
|
13
|
+
}, /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
14
|
+
behavior: this.props.keyboardAvoid && Platform.OS === "ios" && "padding",
|
|
15
|
+
style: styles.popup
|
|
16
|
+
}, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
|
17
|
+
onPress: this.props.onClose
|
|
18
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
19
|
+
style: styles.popupOverlay
|
|
20
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
21
|
+
style: [styles.popupContent, this.props.style, bottom > 0 && {
|
|
22
|
+
paddingBottom: bottom
|
|
23
|
+
}]
|
|
24
|
+
}, this.props.children)));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const styles = {
|
|
28
|
+
popup: {
|
|
29
|
+
flex: 1,
|
|
30
|
+
justifyContent: "center",
|
|
31
|
+
alignItems: "center"
|
|
32
|
+
},
|
|
33
|
+
popupOverlay: {
|
|
34
|
+
position: "absolute",
|
|
35
|
+
backgroundColor: "rgba(19, 19, 26, .25)",
|
|
36
|
+
top: 0,
|
|
37
|
+
left: 0,
|
|
38
|
+
right: 0,
|
|
39
|
+
bottom: 0
|
|
40
|
+
},
|
|
41
|
+
popupContent: {
|
|
42
|
+
borderRadius: 12,
|
|
43
|
+
backgroundColor: "#fff",
|
|
44
|
+
alignItems: "center"
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const MiddlePopupWithInsets = withSafeAreaInsets(MiddlePopup);
|
|
48
|
+
export { MiddlePopupWithInsets as MiddlePopup };
|
|
49
|
+
//# sourceMappingURL=MiddlePopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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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bO,QAAQ,EAAE,UAAU;IACpBC,eAAe,EAAE,uBAAuB;IACxCC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACR3B,MAAM,EAAE;EACT,CAAC;EACDiB,YAAY,EAAE;IACbW,YAAY,EAAE,EAAE;IAChBJ,eAAe,EAAE,MAAM;IACvBF,UAAU,EAAE;EACb;AACD,CAAC;AAED,MAAMO,qBAAqB,GAAGjC,kBAAkB,CAACC,WAAW,CAAC;AAC7D,SAASgC,qBAAqB,IAAIhC,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,296 @@
|
|
|
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
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
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 { 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;
|
|
16
|
+
class PDFPopup extends Component {
|
|
17
|
+
constructor(...args) {
|
|
18
|
+
super(...args);
|
|
19
|
+
_defineProperty(this, "state", {
|
|
20
|
+
loaded: false,
|
|
21
|
+
error: false
|
|
22
|
+
});
|
|
23
|
+
_defineProperty(this, "download", async () => {
|
|
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
|
+
}
|
|
37
|
+
});
|
|
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
|
+
}
|
|
57
|
+
onLoadStarted() {
|
|
58
|
+
this.setState({
|
|
59
|
+
loaded: false,
|
|
60
|
+
error: false
|
|
61
|
+
});
|
|
62
|
+
clearTimeout(this._loadTimeout);
|
|
63
|
+
this._loadTimeout = setTimeout(() => {
|
|
64
|
+
this.setState({
|
|
65
|
+
error: true
|
|
66
|
+
});
|
|
67
|
+
}, 15000);
|
|
68
|
+
}
|
|
69
|
+
onLoadEnded() {
|
|
70
|
+
clearTimeout(this._loadTimeout);
|
|
71
|
+
this._loadTimeout = null;
|
|
72
|
+
this.setState({
|
|
73
|
+
loaded: true
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
onChangeIndex(index) {
|
|
77
|
+
this.props.onChangeIndex(index);
|
|
78
|
+
}
|
|
79
|
+
getUrl() {
|
|
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)}`;
|
|
85
|
+
}
|
|
86
|
+
closePopup() {
|
|
87
|
+
this.props.onClose();
|
|
88
|
+
}
|
|
89
|
+
renderFooter() {
|
|
90
|
+
if (this.props.pdfCount && this.props.pdfCount === 1) {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
94
|
+
style: styles.footerContent
|
|
95
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
96
|
+
onPress: this.onChangeIndex.bind(this, -1),
|
|
97
|
+
activeOpacity: 0.6
|
|
98
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
99
|
+
type: "font-awesome",
|
|
100
|
+
name: "angle-left",
|
|
101
|
+
iconStyle: [styles.chevron]
|
|
102
|
+
})), /*#__PURE__*/React.createElement(Text, {
|
|
103
|
+
style: styles.footerText
|
|
104
|
+
}, this.props.selectedIndex + 1, " / ", this.props.pdfCount), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
105
|
+
onPress: this.onChangeIndex.bind(this, 1),
|
|
106
|
+
activeOpacity: 0.6
|
|
107
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
108
|
+
type: "font-awesome",
|
|
109
|
+
name: "angle-right",
|
|
110
|
+
iconStyle: [styles.chevron]
|
|
111
|
+
})));
|
|
112
|
+
}
|
|
113
|
+
render() {
|
|
114
|
+
if (!this.props.source) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
118
|
+
visible: this.props.visible,
|
|
119
|
+
transparent: true,
|
|
120
|
+
animationType: "slide",
|
|
121
|
+
onRequestClose: this.closePopup.bind(this)
|
|
122
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
123
|
+
style: {
|
|
124
|
+
flex: 1,
|
|
125
|
+
backgroundColor: "#000",
|
|
126
|
+
paddingTop: StatusBarHeight(0)
|
|
127
|
+
}
|
|
128
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
129
|
+
style: styles.headerContent
|
|
130
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
131
|
+
onPress: this.closePopup.bind(this),
|
|
132
|
+
activeOpacity: 0.6
|
|
133
|
+
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
134
|
+
name: "x",
|
|
135
|
+
style: [styles.menuIcon]
|
|
136
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
137
|
+
style: styles.titleContainer
|
|
138
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
139
|
+
style: styles.title
|
|
140
|
+
}, this.props.title)), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
141
|
+
onPress: this.download,
|
|
142
|
+
activeOpacity: 0.6
|
|
143
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
144
|
+
type: "font-awesome",
|
|
145
|
+
name: "cloud-download",
|
|
146
|
+
iconStyle: [styles.menuIcon]
|
|
147
|
+
}))), /*#__PURE__*/React.createElement(View, {
|
|
148
|
+
style: {
|
|
149
|
+
flex: 1,
|
|
150
|
+
backgroundColor: "#fff"
|
|
151
|
+
}
|
|
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, {
|
|
169
|
+
style: {
|
|
170
|
+
height: SCREEN_HEIGHT - StatusBarHeight(145),
|
|
171
|
+
flex: 0
|
|
172
|
+
}
|
|
173
|
+
}), /*#__PURE__*/React.createElement(WebView, {
|
|
174
|
+
source: {
|
|
175
|
+
uri: this.getUrl()
|
|
176
|
+
},
|
|
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;
|
|
190
|
+
},
|
|
191
|
+
style: [{
|
|
192
|
+
flex: 1,
|
|
193
|
+
backgroundColor: "#fff"
|
|
194
|
+
}],
|
|
195
|
+
onLoadStart: this.onLoadStarted.bind(this),
|
|
196
|
+
onLoadEnd: this.onLoadEnded.bind(this)
|
|
197
|
+
}))), this.renderFooter()));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const styles = {
|
|
201
|
+
container: {
|
|
202
|
+
flex: 1,
|
|
203
|
+
position: "relative",
|
|
204
|
+
backgroundColor: "#000"
|
|
205
|
+
},
|
|
206
|
+
innerContainer: {
|
|
207
|
+
flex: 1,
|
|
208
|
+
paddingLeft: 15,
|
|
209
|
+
paddingRight: 15
|
|
210
|
+
},
|
|
211
|
+
menuIcon: {
|
|
212
|
+
fontSize: 25,
|
|
213
|
+
padding: 15,
|
|
214
|
+
width: 55,
|
|
215
|
+
textAlign: "center",
|
|
216
|
+
color: "#fff",
|
|
217
|
+
zIndex: 3
|
|
218
|
+
},
|
|
219
|
+
headerContent: {
|
|
220
|
+
flexDirection: "row",
|
|
221
|
+
alignItems: "center",
|
|
222
|
+
height: 70
|
|
223
|
+
},
|
|
224
|
+
titleContainer: {
|
|
225
|
+
flex: 1
|
|
226
|
+
},
|
|
227
|
+
title: {
|
|
228
|
+
color: "#fff",
|
|
229
|
+
fontFamily: "sf-semibold",
|
|
230
|
+
fontSize: 16,
|
|
231
|
+
textAlign: "center"
|
|
232
|
+
},
|
|
233
|
+
footerContent: {
|
|
234
|
+
flexDirection: "row",
|
|
235
|
+
alignItems: "center",
|
|
236
|
+
justifyContent: "center",
|
|
237
|
+
height: 70
|
|
238
|
+
//alignSelf: 'flex-end'
|
|
239
|
+
},
|
|
240
|
+
chevron: {
|
|
241
|
+
fontSize: 25,
|
|
242
|
+
padding: 15,
|
|
243
|
+
width: 55,
|
|
244
|
+
textAlign: "center",
|
|
245
|
+
color: "#fff",
|
|
246
|
+
zIndex: 3
|
|
247
|
+
},
|
|
248
|
+
footerText: {
|
|
249
|
+
fontFamily: "sf-regular",
|
|
250
|
+
fontSize: 14,
|
|
251
|
+
color: "#fff",
|
|
252
|
+
width: 150,
|
|
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
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
export { PDFPopup };
|
|
296
|
+
//# sourceMappingURL=PDFPopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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\tf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