@plusscommunities/pluss-core-app 8.0.27 → 8.0.28
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/package.json +1 -1
- package/src/components/react-native-expo-image-cropper/ExpoImageManipulator.js +21 -22
- package/dist/module/actions/FollowerActions.js +0 -34
- package/dist/module/actions/FollowerActions.js.map +0 -1
- package/dist/module/actions/MediaActions.js +0 -29
- package/dist/module/actions/MediaActions.js.map +0 -1
- package/dist/module/actions/ResidentActions.js +0 -26
- package/dist/module/actions/ResidentActions.js.map +0 -1
- package/dist/module/actions/UserActions.js +0 -223
- package/dist/module/actions/UserActions.js.map +0 -1
- package/dist/module/actions/UserSettingsActions.js +0 -14
- package/dist/module/actions/UserSettingsActions.js.map +0 -1
- package/dist/module/actions/index.js +0 -6
- package/dist/module/actions/index.js.map +0 -1
- package/dist/module/actions/types.js +0 -17
- package/dist/module/actions/types.js.map +0 -1
- package/dist/module/apis/analyticsActions.js +0 -20
- package/dist/module/apis/analyticsActions.js.map +0 -1
- package/dist/module/apis/contactActions.js +0 -27
- package/dist/module/apis/contactActions.js.map +0 -1
- package/dist/module/apis/eventActions.js +0 -161
- package/dist/module/apis/eventActions.js.map +0 -1
- package/dist/module/apis/fileActions.js +0 -93
- package/dist/module/apis/fileActions.js.map +0 -1
- package/dist/module/apis/followerActions.js +0 -38
- package/dist/module/apis/followerActions.js.map +0 -1
- package/dist/module/apis/index.js +0 -13
- package/dist/module/apis/index.js.map +0 -1
- package/dist/module/apis/notificationActions.js +0 -60
- package/dist/module/apis/notificationActions.js.map +0 -1
- package/dist/module/apis/profileActions.js +0 -14
- package/dist/module/apis/profileActions.js.map +0 -1
- package/dist/module/apis/reactionActions.js +0 -76
- package/dist/module/apis/reactionActions.js.map +0 -1
- package/dist/module/apis/settingActions.js +0 -22
- package/dist/module/apis/settingActions.js.map +0 -1
- package/dist/module/apis/stringActions.js +0 -30
- package/dist/module/apis/stringActions.js.map +0 -1
- package/dist/module/apis/typeActions.js +0 -15
- package/dist/module/apis/typeActions.js.map +0 -1
- package/dist/module/apis/userActions.js +0 -104
- package/dist/module/apis/userActions.js.map +0 -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 +0 -4205
- 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 +0 -165
- package/dist/module/colours.js.map +0 -1
- package/dist/module/components/AddButton.js +0 -43
- package/dist/module/components/AddButton.js.map +0 -1
- package/dist/module/components/AddToCalendarButton.js +0 -225
- package/dist/module/components/AddToCalendarButton.js.map +0 -1
- package/dist/module/components/Attachment.js +0 -55
- package/dist/module/components/Attachment.js.map +0 -1
- package/dist/module/components/AudienceSelectorLauncher.js +0 -64
- package/dist/module/components/AudienceSelectorLauncher.js.map +0 -1
- package/dist/module/components/AudienceSelectorPage.js +0 -351
- package/dist/module/components/AudienceSelectorPage.js.map +0 -1
- package/dist/module/components/AutoOffsetImage.js +0 -184
- package/dist/module/components/AutoOffsetImage.js.map +0 -1
- package/dist/module/components/BackButton.js +0 -58
- package/dist/module/components/BackButton.js.map +0 -1
- package/dist/module/components/CalendarPopup.js +0 -126
- package/dist/module/components/CalendarPopup.js.map +0 -1
- package/dist/module/components/CategoryTabs.js +0 -155
- package/dist/module/components/CategoryTabs.js.map +0 -1
- package/dist/module/components/CommentReply.js +0 -334
- package/dist/module/components/CommentReply.js.map +0 -1
- package/dist/module/components/CommentSection.js +0 -823
- package/dist/module/components/CommentSection.js.map +0 -1
- package/dist/module/components/ConfirmPopup.js +0 -109
- package/dist/module/components/ConfirmPopup.js.map +0 -1
- package/dist/module/components/ConfirmationPopup.js +0 -72
- package/dist/module/components/ConfirmationPopup.js.map +0 -1
- package/dist/module/components/DocumentUploader.js +0 -253
- package/dist/module/components/DocumentUploader.js.map +0 -1
- package/dist/module/components/DropDownItem.js +0 -75
- package/dist/module/components/DropDownItem.js.map +0 -1
- package/dist/module/components/DropDownMenu.js +0 -41
- package/dist/module/components/DropDownMenu.js.map +0 -1
- package/dist/module/components/EmptyStateMain.js +0 -51
- package/dist/module/components/EmptyStateMain.js.map +0 -1
- package/dist/module/components/EmptyStateWidget.js +0 -48
- package/dist/module/components/EmptyStateWidget.js.map +0 -1
- package/dist/module/components/FontScaleButton.js +0 -37
- package/dist/module/components/FontScaleButton.js.map +0 -1
- package/dist/module/components/FontScalePopup.js +0 -76
- package/dist/module/components/FontScalePopup.js.map +0 -1
- package/dist/module/components/Forbidden.js +0 -58
- package/dist/module/components/Forbidden.js.map +0 -1
- package/dist/module/components/FormCard.js +0 -25
- package/dist/module/components/FormCard.js.map +0 -1
- package/dist/module/components/FormCardSection.js +0 -214
- package/dist/module/components/FormCardSection.js.map +0 -1
- package/dist/module/components/FormCardSectionOptionLauncher.js +0 -73
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +0 -1
- package/dist/module/components/FormattedText.js +0 -133
- package/dist/module/components/FormattedText.js.map +0 -1
- package/dist/module/components/GenericInput.js +0 -151
- package/dist/module/components/GenericInput.js.map +0 -1
- package/dist/module/components/GenericInputSection.js +0 -173
- package/dist/module/components/GenericInputSection.js.map +0 -1
- package/dist/module/components/Header.js +0 -459
- package/dist/module/components/Header.js.map +0 -1
- package/dist/module/components/Icon.js +0 -109
- package/dist/module/components/Icon.js.map +0 -1
- package/dist/module/components/ImagePopup.js +0 -400
- package/dist/module/components/ImagePopup.js.map +0 -1
- package/dist/module/components/ImageUploadProgress.js +0 -69
- package/dist/module/components/ImageUploadProgress.js.map +0 -1
- package/dist/module/components/ImageUploader.js +0 -831
- package/dist/module/components/ImageUploader.js.map +0 -1
- package/dist/module/components/InlineButton.js +0 -66
- package/dist/module/components/InlineButton.js.map +0 -1
- package/dist/module/components/Input.js +0 -156
- package/dist/module/components/Input.js.map +0 -1
- package/dist/module/components/LoadingCircles.js +0 -219
- package/dist/module/components/LoadingCircles.js.map +0 -1
- package/dist/module/components/LoadingIndicator.js +0 -86
- package/dist/module/components/LoadingIndicator.js.map +0 -1
- package/dist/module/components/LoadingStateWidget.js +0 -46
- package/dist/module/components/LoadingStateWidget.js.map +0 -1
- package/dist/module/components/MediaPlayer.js +0 -407
- package/dist/module/components/MediaPlayer.js.map +0 -1
- package/dist/module/components/MiddlePopup.js +0 -49
- package/dist/module/components/MiddlePopup.js.map +0 -1
- package/dist/module/components/PDFPopup.js +0 -203
- package/dist/module/components/PDFPopup.js.map +0 -1
- package/dist/module/components/PlussChat.js +0 -1078
- package/dist/module/components/PlussChat.js.map +0 -1
- package/dist/module/components/PlussChatMessage.js +0 -299
- package/dist/module/components/PlussChatMessage.js.map +0 -1
- package/dist/module/components/PlussChatTime.js +0 -59
- package/dist/module/components/PlussChatTime.js.map +0 -1
- package/dist/module/components/Popup.js +0 -126
- package/dist/module/components/Popup.js.map +0 -1
- package/dist/module/components/PopupMenu.js +0 -120
- package/dist/module/components/PopupMenu.js.map +0 -1
- package/dist/module/components/PositionedImage.js +0 -313
- package/dist/module/components/PositionedImage.js.map +0 -1
- package/dist/module/components/ProfilePic.js +0 -105
- package/dist/module/components/ProfilePic.js.map +0 -1
- package/dist/module/components/RadioButton.js +0 -78
- package/dist/module/components/RadioButton.js.map +0 -1
- package/dist/module/components/Reaction.js +0 -117
- package/dist/module/components/Reaction.js.map +0 -1
- package/dist/module/components/Reactions.js +0 -71
- package/dist/module/components/Reactions.js.map +0 -1
- package/dist/module/components/SharingTools.js +0 -189
- package/dist/module/components/SharingTools.js.map +0 -1
- package/dist/module/components/Spinner.js +0 -22
- package/dist/module/components/Spinner.js.map +0 -1
- package/dist/module/components/StickyFooter.js +0 -34
- package/dist/module/components/StickyFooter.js.map +0 -1
- package/dist/module/components/Text.js +0 -57
- package/dist/module/components/Text.js.map +0 -1
- package/dist/module/components/TickIcon.js +0 -24
- package/dist/module/components/TickIcon.js.map +0 -1
- package/dist/module/components/Toggle.js +0 -66
- package/dist/module/components/Toggle.js.map +0 -1
- package/dist/module/components/TouchableSearchBar.js +0 -68
- package/dist/module/components/TouchableSearchBar.js.map +0 -1
- package/dist/module/components/UserListPopup.js +0 -136
- package/dist/module/components/UserListPopup.js.map +0 -1
- package/dist/module/components/UserListing.js +0 -268
- package/dist/module/components/UserListing.js.map +0 -1
- package/dist/module/components/VideoPopup.js +0 -113
- package/dist/module/components/VideoPopup.js.map +0 -1
- package/dist/module/components/WarningPopup.js +0 -85
- package/dist/module/components/WarningPopup.js.map +0 -1
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +0 -289
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +0 -1
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +0 -117
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +0 -1
- package/dist/module/components/index.js +0 -60
- package/dist/module/components/index.js.map +0 -1
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +0 -415
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +0 -1
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +0 -387
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +0 -1
- package/dist/module/config.js +0 -27
- package/dist/module/config.js.map +0 -1
- package/dist/module/constants.js +0 -18
- package/dist/module/constants.js.map +0 -1
- package/dist/module/helper.js +0 -424
- package/dist/module/helper.js.map +0 -1
- package/dist/module/index.js +0 -13
- package/dist/module/index.js.map +0 -1
- package/dist/module/js/images/detectFaces.js +0 -31
- package/dist/module/js/images/detectFaces.js.map +0 -1
- package/dist/module/js/images/findLandmarkRange.js +0 -93
- package/dist/module/js/images/findLandmarkRange.js.map +0 -1
- package/dist/module/js/images/getScaledOffset.js +0 -81
- package/dist/module/js/images/getScaledOffset.js.map +0 -1
- package/dist/module/js/site/getSiteLevelFromState.js +0 -29
- package/dist/module/js/site/getSiteLevelFromState.js.map +0 -1
- package/dist/module/js/site/isTVEnabled.js +0 -10
- package/dist/module/js/site/isTVEnabled.js.map +0 -1
- package/dist/module/session.js +0 -58
- package/dist/module/session.js.map +0 -1
- package/dist/module/styles.js +0 -67
- package/dist/module/styles.js.map +0 -1
- package/dist/module/withNavigationFocus.js +0 -30
- package/dist/module/withNavigationFocus.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","View","TouchableOpacity","Image","StyleSheet","Text","_","moment","connect","Icon","getPluralS","getThumb300","get1400","getSiteSettingFromState","getFirstName","getPluralOptions","getMainBrandingColourFromState","TEXT_DARKEST","BG_GREY","TEXT_LIGHT","LINEGREY","reactionActions","notificationActions","blockUser","unblockUser","ConfirmPopup","ProfilePic","ImagePopup","InlineButton","Spinner","Services","CommentSection","constructor","props","_defineProperty","c","setState","commentToDelete","removeComment","state","Id","then","res","console","log","newComments","filter","comments","commentToReport","commentToBlock","userId","UserId","commentToUnblock","commentId","reportLoading","reportComment","commentReportedStatus","catch","error","comment","navigation","navigate","threadId","entityType","entityId","processing","data","muteEntity","muteExpiry","Expiry","unmuteEntity","actual","duration","diff","asHours","Math","abs","ceil","notificationsForComments","getEntityNotificationSetting","muteLoaded","commentsLoading","includes","blockedUsers","user","uid","isUserBlocked","hideReplyButton","threadComments","innerC","ParentId","content","isEmpty","createElement","style","styles","commentRepliesText","color","colourBrandingMain","User","displayName","profilePics","take","uniqBy","multiReplyContainer","map","i","key","marginRight","Diameter","profilePic","marginLeft","length","commentReplies","onPress","onOpenThread","addingComment","componentDidMount","getNotificationSate","hidden","getComments","componentWillUnmount","loadTimer","clearTimeout","onPressCommentImage","image","imagePopupSource","imagePopupOpen","onGoToAdd","_this$props$commentRe","commentReply","current","focusInput","getAdjustedSize","size","scaleFont","fontScale","commentsLoadStarted","_this$props$commentRe2","loadingStarted","loadComments","minTime","maxBy","Timestamp","_this$props$commentRe3","sortBy","concat","onCommentsLoaded","loadingCompleted","live","setTimeout","refreshFrequency","startedAddingComment","commentAdded","push","onCommentAdded","canRemoveComment","permissions","adminPermission","closeCommentGallery","renderCommentDeleteConfirm","visible","onConfirm","onPressConfirmDelete","onCancel","onPressCancelDelete","onClose","text","renderCommentReportConfirm","onPressConfirmReport","onPressCancelReport","extraContent","commentReportText","renderCommentBlockConfirm","onPressConfirmBlock","onPressCancelBlock","renderCommentUnblockConfirm","onPressConfirmUnblock","onPressCancelUnblock","renderCommentReportStatus","isSuccess","onPressConfirmReportStatus","hideNo","yesText","renderCommentImage","commentImageContainer","bind","commentImage","source","uri","renderComment","commentFlex","commentProfilePic","commentBlock","commentTitleRow","onPressDeleteComment","commentButtonContainer","backgroundColor","name","type","iconStyle","commentButtonIcon","disableFlag","onPressReportComment","canBlockComment","onPressUnblockUser","onPressBlockUser","commentName","fontSize","Comment","commentText","commentBottom","commentTime","utc","local","format","renderReplyText","renderMute","muteSpinnerContainer","isMuted","hours","getMuteRemaining","mutedFor","muteContainer","mutedForText","onUnmute","onMute","borderColor","muteButton","disabled","disabledOpacity","noText","muteButtonInner","muteButtonIcon","muteButtonText","renderComments","commentSection","isNil","placeHolder","commentsEmpty","reverseOrder","reverse","showReplies","commentSectionTitleRow","alignItems","hideAddComment","goToText","commentCount","renderCommentImagePopup","images","renderReportLoading","reportLoadingContainer","render","commentSectionOuter","create","flex","paddingHorizontal","paddingVertical","borderTopColor","borderTopWidth","fontFamily","marginTop","flexDirection","borderRadius","padding","width","height","justifyContent","textAlign","paddingLeft","marginBottom","borderWidth","mapStateToProps","userSettings","forwardRef"],"sources":["CommentSection.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport { View, TouchableOpacity, Image, StyleSheet } from \"react-native\";\nimport { Text } from \"./Text\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\nimport { connect } from \"react-redux\";\nimport { Icon } from \"@rneui/themed\";\nimport {\n\tgetPluralS,\n\tgetThumb300,\n\tget1400,\n\tgetSiteSettingFromState,\n\tgetFirstName,\n\tgetPluralOptions,\n} from \"../helper\";\nimport {\n\tgetMainBrandingColourFromState,\n\tTEXT_DARKEST,\n\tBG_GREY,\n\tTEXT_LIGHT,\n\tLINEGREY,\n} from \"../colours\";\nimport { reactionActions, notificationActions } from \"../apis\";\nimport { blockUser, unblockUser } from \"../actions\";\nimport { ConfirmPopup } from \"./ConfirmPopup\";\nimport { ProfilePic } from \"./ProfilePic\";\nimport { ImagePopup } from \"./ImagePopup\";\nimport { InlineButton } from \"./InlineButton\";\nimport { Spinner } from \"./Spinner\";\nimport { Services } from \"../config\";\n\nclass CommentSection extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tcommentsLoading: false,\n\t\t\tcomments: [],\n\t\t\taddingComment: false,\n\t\t\tcommentToDelete: null,\n\t\t\tcommentToReport: null,\n\t\t\tcommentReportedStatus: null,\n\t\t\treportLoading: false,\n\t\t\tprocessing: false,\n\t\t\tmuteExpiry: null,\n\t\t\tmuteLoaded: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.getNotificationSate();\n\n\t\tif (!_.includes(this.props.user.hidden, \"viewComment\")) {\n\t\t\tthis.getComments();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (this.loadTimer) {\n\t\t\tclearTimeout(this.loadTimer);\n\t\t}\n\t}\n\n\tonPressDeleteComment = (c) => {\n\t\tthis.setState({ commentToDelete: c });\n\t};\n\n\tonPressConfirmDelete = () => {\n\t\treactionActions.removeComment(this.state.commentToDelete.Id).then((res) => {\n\t\t\tconsole.log(\"deleted\");\n\t\t});\n\t\tconst newComments = _.filter(this.state.comments, (c) => {\n\t\t\treturn c.Id !== this.state.commentToDelete.Id;\n\t\t});\n\t\tthis.setState({\n\t\t\tcomments: newComments,\n\t\t\tcommentToDelete: null,\n\t\t});\n\t};\n\n\tonPressCancelDelete = () => {\n\t\tthis.setState({ commentToDelete: null });\n\t};\n\n\tonPressReportComment = (c) => {\n\t\tthis.setState({ commentToReport: c });\n\t};\n\n\tonPressBlockUser = (c) => {\n\t\tthis.setState({ commentToBlock: c });\n\t};\n\n\tonPressConfirmBlock = () => {\n\t\tconst userId = this.state.commentToBlock.UserId;\n\t\tthis.props.blockUser(userId);\n\t\tthis.setState({ commentToBlock: null });\n\t};\n\n\tonPressCancelBlock = () => {\n\t\tthis.setState({ commentToBlock: null });\n\t};\n\n\tonPressUnblockUser = (c) => {\n\t\tthis.setState({ commentToUnblock: c });\n\t};\n\n\tonPressConfirmUnblock = () => {\n\t\tconst userId = this.state.commentToUnblock.UserId;\n\t\tthis.props.unblockUser(userId);\n\t\tthis.setState({ commentToUnblock: null });\n\t};\n\n\tonPressCancelUnblock = () => {\n\t\tthis.setState({ commentToUnblock: null });\n\t};\n\n\tonPressConfirmReport = () => {\n\t\tconst commentId = this.state.commentToReport.Id;\n\t\tthis.setState({ reportLoading: true, commentToReport: null }, () => {\n\t\t\treactionActions\n\t\t\t\t.reportComment(commentId)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tcommentReportedStatus: \"success\",\n\t\t\t\t\t\treportLoading: false,\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tconsole.log(\"reportComment\", error);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tcommentReportedStatus: \"fail\",\n\t\t\t\t\t\treportLoading: false,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t};\n\n\tonPressCancelReport = () => {\n\t\tthis.setState({ commentToReport: null });\n\t};\n\n\tonPressConfirmReportStatus = () => {\n\t\tthis.setState({ commentReportedStatus: null });\n\t};\n\n\tonPressCommentImage(image) {\n\t\tthis.setState({\n\t\t\timagePopupSource: [image],\n\t\t\timagePopupOpen: true,\n\t\t});\n\t}\n\n\tonGoToAdd() {\n\t\tthis.props.commentReply?.current?.focusInput();\n\t}\n\n\tonOpenThread = (comment) => {\n\t\tServices.navigation.navigate(\"thread\", {\n\t\t\t...this.props,\n\t\t\tthreadId: comment.Id,\n\t\t});\n\t};\n\n\tonMute = () => {\n\t\tconst { entityType, entityId } = this.props;\n\t\tthis.setState({ processing: true }, async () => {\n\t\t\ttry {\n\t\t\t\tconst { data } = await notificationActions.muteEntity(\n\t\t\t\t\tentityType,\n\t\t\t\t\tentityId,\n\t\t\t\t);\n\t\t\t\t// console.log('onMute', data);\n\t\t\t\tconst muteExpiry = moment(data.Expiry);\n\t\t\t\tthis.setState({ muteExpiry, processing: false });\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"onMute\", error);\n\t\t\t\tthis.setState({ processing: false });\n\t\t\t}\n\t\t});\n\t};\n\n\tonUnmute = () => {\n\t\tconst { entityType, entityId } = this.props;\n\t\tthis.setState({ processing: true }, async () => {\n\t\t\ttry {\n\t\t\t\tconst { data } = await notificationActions.unmuteEntity(\n\t\t\t\t\tentityType,\n\t\t\t\t\tentityId,\n\t\t\t\t);\n\t\t\t\t// console.log('onUnmute', data);\n\t\t\t\tthis.setState({ muteExpiry: null, processing: false });\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"onUnmute\", error);\n\t\t\t\tthis.setState({ processing: false });\n\t\t\t}\n\t\t});\n\t};\n\n\tisMuted = () => {\n\t\tconst { muteExpiry } = this.state;\n\t\treturn muteExpiry && moment() <= muteExpiry;\n\t};\n\n\tgetMuteRemaining = () => {\n\t\tconst { muteExpiry } = this.state;\n\t\tconst actual = muteExpiry\n\t\t\t? moment.duration(muteExpiry.diff(moment())).asHours()\n\t\t\t: 0;\n\t\treturn Math.abs(Math.ceil(actual));\n\t};\n\n\tgetNotificationSate = () => {\n\t\tconst { processing } = this.state;\n\t\tconst { entityType, entityId, notificationsForComments } = this.props;\n\t\tif (processing || !notificationsForComments) return;\n\n\t\tthis.setState({ processing: true }, async () => {\n\t\t\ttry {\n\t\t\t\tconst { data } = await notificationActions.getEntityNotificationSetting(\n\t\t\t\t\tentityType,\n\t\t\t\t\tentityId,\n\t\t\t\t);\n\t\t\t\t// console.log('getNotificationSate', data);\n\t\t\t\tconst muteExpiry = data ? moment(data.Expiry) : null;\n\t\t\t\tthis.setState({ muteExpiry, muteLoaded: true, processing: false });\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"getNotificationSate\", error);\n\t\t\t\tthis.setState({ processing: false });\n\t\t\t}\n\t\t});\n\t};\n\n\tgetAdjustedSize(size) {\n\t\tif (this.props.scaleFont) {\n\t\t\treturn size + this.props.user.fontScale;\n\t\t}\n\t\treturn size;\n\t}\n\n\tgetComments() {\n\t\tif (!this.state.commentsLoadStarted) {\n\t\t\tthis.setState({\n\t\t\t\tcommentsLoadStarted: true,\n\t\t\t\tcommentsLoading: true,\n\t\t\t});\n\t\t\tthis.props.commentReply?.current?.loadingStarted();\n\n\t\t\tthis.loadComments();\n\t\t}\n\t}\n\n\tisEmpty() {\n\t\treturn _.isEmpty(this.state.comments);\n\t}\n\n\tloadComments() {\n\t\tconst minTime = this.isEmpty()\n\t\t\t? 0\n\t\t\t: _.maxBy(this.state.comments, (c) => {\n\t\t\t\t\treturn c.Timestamp;\n\t\t\t\t}).Timestamp;\n\t\treactionActions\n\t\t\t.getComments(this.props.entityId, this.props.entityType, minTime)\n\t\t\t.then((res) => {\n\t\t\t\tthis.setState(\n\t\t\t\t\t{\n\t\t\t\t\t\tcomments: _.sortBy(\n\t\t\t\t\t\t\t_.uniqBy(\n\t\t\t\t\t\t\t\t_.filter(_.concat(this.state.comments, res.data), (c) => {\n\t\t\t\t\t\t\t\t\tif (!this.props.threadId) {\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\tc.Id === this.props.threadId ||\n\t\t\t\t\t\t\t\t\t\tc.ParentId === this.props.threadId\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(c) => {\n\t\t\t\t\t\t\t\t\treturn c.Id;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\"Timestamp\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcommentsLoading: false,\n\t\t\t\t\t},\n\t\t\t\t\t() => {\n\t\t\t\t\t\tif (this.props.onCommentsLoaded) {\n\t\t\t\t\t\t\tthis.props.onCommentsLoaded(this.state.comments.length);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\t//if (this.props.commentReply) {\n\t\t\t\tthis.props.commentReply?.current?.loadingCompleted();\n\t\t\t\t//}\n\t\t\t\tif (this.props.live) {\n\t\t\t\t\tthis.loadTimer = setTimeout(() => {\n\t\t\t\t\t\tthis.loadComments();\n\t\t\t\t\t}, this.props.refreshFrequency || 2000);\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tisLoading = () => {\n\t\treturn this.state.commentsLoading;\n\t};\n\n\tstartedAddingComment() {\n\t\tthis.setState({\n\t\t\taddingComment: true,\n\t\t});\n\t}\n\n\tcommentAdded(comment) {\n\t\tconst newComments = this.state.comments;\n\t\tnewComments.push(comment);\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\taddingComment: false,\n\t\t\t\tcomments: newComments,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.props.onCommentAdded) {\n\t\t\t\t\tthis.props.onCommentAdded();\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\t}\n\n\tisUserBlocked = (c) => {\n\t\treturn _.includes(this.props.blockedUsers, c.UserId);\n\t};\n\n\tcanBlockComment = (c) => {\n\t\treturn this.props.user.uid !== c.UserId;\n\t};\n\n\tcanRemoveComment(c) {\n\t\tif (this.props.user.uid === c.UserId) {\n\t\t\treturn true;\n\t\t}\n\t\treturn _.includes(this.props.user.permissions, this.props.adminPermission);\n\t}\n\n\tcloseCommentGallery() {\n\t\tthis.setState({\n\t\t\timagePopupSource: [],\n\t\t\timagePopupOpen: false,\n\t\t});\n\t}\n\n\trenderCommentDeleteConfirm() {\n\t\treturn (\n\t\t\t<ConfirmPopup\n\t\t\t\tvisible={!!this.state.commentToDelete}\n\t\t\t\tonConfirm={this.onPressConfirmDelete}\n\t\t\t\tonCancel={this.onPressCancelDelete}\n\t\t\t\tonClose={this.onPressCancelDelete}\n\t\t\t\ttext=\"Are you sure you want to delete this comment?\"\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderCommentReportConfirm() {\n\t\treturn (\n\t\t\t<ConfirmPopup\n\t\t\t\tvisible={!!this.state.commentToReport}\n\t\t\t\tonConfirm={this.onPressConfirmReport}\n\t\t\t\tonCancel={this.onPressCancelReport}\n\t\t\t\tonClose={this.onPressCancelReport}\n\t\t\t\ttext=\"Are you sure you want to report this comment?\"\n\t\t\t\textraContent={\n\t\t\t\t\t<Text style={styles.commentReportText}>\n\t\t\t\t\t\tThis comment will be reported to our team and considered for\n\t\t\t\t\t\tdeletion\n\t\t\t\t\t</Text>\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderCommentBlockConfirm() {\n\t\treturn (\n\t\t\t<ConfirmPopup\n\t\t\t\tvisible={!!this.state.commentToBlock}\n\t\t\t\tonConfirm={this.onPressConfirmBlock}\n\t\t\t\tonCancel={this.onPressCancelBlock}\n\t\t\t\tonClose={this.onPressCancelBlock}\n\t\t\t\ttext=\"Are you sure you want to block this user?\"\n\t\t\t\textraContent={\n\t\t\t\t\t<Text style={styles.commentReportText}>\n\t\t\t\t\t\tYou will no longer see comments made by this user\n\t\t\t\t\t</Text>\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderCommentUnblockConfirm() {\n\t\treturn (\n\t\t\t<ConfirmPopup\n\t\t\t\tvisible={!!this.state.commentToUnblock}\n\t\t\t\tonConfirm={this.onPressConfirmUnblock}\n\t\t\t\tonCancel={this.onPressCancelUnblock}\n\t\t\t\tonClose={this.onPressCancelUnblock}\n\t\t\t\ttext=\"Are you sure you want to unblock this user?\"\n\t\t\t\textraContent={\n\t\t\t\t\t<Text style={styles.commentReportText}>\n\t\t\t\t\t\tYou will once again see comments made by this user\n\t\t\t\t\t</Text>\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderCommentReportStatus() {\n\t\tconst { commentReportedStatus } = this.state;\n\t\tconst isSuccess = commentReportedStatus === \"success\";\n\t\treturn (\n\t\t\t<ConfirmPopup\n\t\t\t\tvisible={!!commentReportedStatus}\n\t\t\t\tonConfirm={this.onPressConfirmReportStatus}\n\t\t\t\ttext={isSuccess ? \"Thank you for reporting\" : \"Unable to report\"}\n\t\t\t\textraContent={\n\t\t\t\t\t<Text style={styles.commentReportText}>\n\t\t\t\t\t\t{isSuccess\n\t\t\t\t\t\t\t? \"We will review the comment within 24 hours\"\n\t\t\t\t\t\t\t: \"There was a problem reporting the comment please try again later\"}\n\t\t\t\t\t</Text>\n\t\t\t\t}\n\t\t\t\thideNo\n\t\t\t\tyesText={\"Done\"}\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderCommentImage(c) {\n\t\tif (_.isEmpty(c.Image)) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<TouchableOpacity\n\t\t\t\tstyle={styles.commentImageContainer}\n\t\t\t\tonPress={this.onPressCommentImage.bind(this, get1400(c.Image))}\n\t\t\t>\n\t\t\t\t<Image\n\t\t\t\t\tstyle={styles.commentImage}\n\t\t\t\t\tsource={{ uri: getThumb300(c.Image) }}\n\t\t\t\t/>\n\t\t\t</TouchableOpacity>\n\t\t);\n\t}\n\n\trenderReplyText = (c, isUserBlocked) => {\n\t\tif (this.props.threadId || this.props.hideReplyButton) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst threadComments = _.filter(this.state.comments, (innerC) => {\n\t\t\treturn innerC.ParentId === c.Id;\n\t\t});\n\n\t\tlet content = null;\n\n\t\tif (_.isEmpty(threadComments)) {\n\t\t\t// no replies\n\t\t\tcontent = (\n\t\t\t\t<Text\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\tstyles.commentRepliesText,\n\t\t\t\t\t\t{ color: this.props.colourBrandingMain },\n\t\t\t\t\t]}\n\t\t\t\t>{`Reply to ${getFirstName(\n\t\t\t\t\t!isUserBlocked && c.User ? c.User.displayName : \"comment\",\n\t\t\t\t)}`}</Text>\n\t\t\t);\n\t\t} else {\n\t\t\t// existing replies\n\t\t\tconst profilePics = _.take(\n\t\t\t\t_.uniqBy(threadComments, (c) => c.UserId),\n\t\t\t\t3,\n\t\t\t);\n\t\t\tcontent = (\n\t\t\t\t<View style={styles.multiReplyContainer}>\n\t\t\t\t\t{profilePics.map((c, i) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ProfilePic\n\t\t\t\t\t\t\t\tkey={c.Id}\n\t\t\t\t\t\t\t\tstyle={{ marginRight: -10 }}\n\t\t\t\t\t\t\t\tDiameter={20}\n\t\t\t\t\t\t\t\tProfilePic={c.User.profilePic}\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<Text\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\tstyles.commentRepliesText,\n\t\t\t\t\t\t\t{ marginLeft: 20, color: this.props.colourBrandingMain },\n\t\t\t\t\t\t]}\n\t\t\t\t\t>{`${\n\t\t\t\t\t\tthreadComments.length\n\t\t\t\t\t} repl${getPluralOptions(threadComments.length, \"y\", \"ies\")}`}</Text>\n\t\t\t\t</View>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<View style={styles.commentReplies}>\n\t\t\t\t<TouchableOpacity\n\t\t\t\t\tonPress={() => {\n\t\t\t\t\t\tthis.onOpenThread(c);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{content}\n\t\t\t\t</TouchableOpacity>\n\t\t\t</View>\n\t\t);\n\t};\n\n\trenderComment(c) {\n\t\tconst isUserBlocked = this.isUserBlocked(c);\n\t\treturn (\n\t\t\t<View style={styles.comment} key={c.Id}>\n\t\t\t\t<View style={styles.commentFlex}>\n\t\t\t\t\t<ProfilePic\n\t\t\t\t\t\tProfilePic={isUserBlocked ? null : c.User.profilePic}\n\t\t\t\t\t\tDiameter={40}\n\t\t\t\t\t\tstyle={styles.commentProfilePic}\n\t\t\t\t\t/>\n\t\t\t\t\t<View style={styles.commentBlock}>\n\t\t\t\t\t\t<View style={styles.commentTitleRow}>\n\t\t\t\t\t\t\t{this.canRemoveComment(c) ? (\n\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\tonPress={this.onPressDeleteComment.bind(this, c)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t\tstyles.commentButtonContainer,\n\t\t\t\t\t\t\t\t\t\t\t{ backgroundColor: this.props.colourBrandingMain },\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\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\tname=\"trash\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\t\t\t\t\ticonStyle={styles.commentButtonIcon}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t!this.props.disableFlag && (\n\t\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\t\tonPress={this.onPressReportComment.bind(this, c)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t\t\tstyles.commentButtonContainer,\n\t\t\t\t\t\t\t\t\t\t\t\t{ backgroundColor: this.props.colourBrandingMain },\n\t\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"flag\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\t\t\t\t\t\ticonStyle={styles.commentButtonIcon}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!this.props.disableFlag &&\n\t\t\t\t\t\t\t\tthis.canBlockComment(c) &&\n\t\t\t\t\t\t\t\t(isUserBlocked ? (\n\t\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\t\tstyle={{ marginRight: 8 }}\n\t\t\t\t\t\t\t\t\t\tonPress={this.onPressUnblockUser.bind(this, c)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t\t\tstyles.commentButtonContainer,\n\t\t\t\t\t\t\t\t\t\t\t\t{ backgroundColor: this.props.colourBrandingMain },\n\t\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"user-plus\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\t\t\t\t\t\ticonStyle={styles.commentButtonIcon}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\t\tstyle={{ marginRight: 8 }}\n\t\t\t\t\t\t\t\t\t\tonPress={this.onPressBlockUser.bind(this, c)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t\t\tstyles.commentButtonContainer,\n\t\t\t\t\t\t\t\t\t\t\t\t{ backgroundColor: this.props.colourBrandingMain },\n\t\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"user-times\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\t\t\t\t\t\ticonStyle={styles.commentButtonIcon}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\tstyles.commentName,\n\t\t\t\t\t\t\t\t\t{ fontSize: this.getAdjustedSize(13) },\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{isUserBlocked ? \"[blocked user]\" : c.User.displayName}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t{!_.isEmpty(c.Comment) && (\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\tstyles.commentText,\n\t\t\t\t\t\t\t\t\t{ fontSize: this.getAdjustedSize(13) },\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{isUserBlocked ? \"[hidden]\" : c.Comment}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!isUserBlocked && this.renderCommentImage(c)}\n\t\t\t\t\t</View>\n\t\t\t\t</View>\n\t\t\t\t<View style={styles.commentBottom}>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={[styles.commentTime, { fontSize: this.getAdjustedSize(13) }]}\n\t\t\t\t\t>\n\t\t\t\t\t\t{moment.utc(c.Timestamp).local().format(\"D MMM • h:mma\")}\n\t\t\t\t\t</Text>\n\t\t\t\t\t{this.renderReplyText(c, isUserBlocked)}\n\t\t\t\t</View>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trenderMute() {\n\t\tconst { notificationsForComments } = this.props;\n\t\tconst { muteLoaded, muteExpiry, processing } = this.state;\n\t\tif (!notificationsForComments || !muteLoaded) return null;\n\n\t\tif (processing)\n\t\t\treturn (\n\t\t\t\t<View style={styles.muteSpinnerContainer}>\n\t\t\t\t\t<Spinner size={\"small\"} color={this.props.colourBrandingMain} />\n\t\t\t\t</View>\n\t\t\t);\n\n\t\tconst isMuted = this.isMuted();\n\t\tconst hours = this.getMuteRemaining();\n\t\tconst mutedFor = `Muted for ${hours} hour${getPluralS(hours)}`;\n\t\t// console.log(muteExpiry.format('DD MMM YYYY hh:mm a'));\n\n\t\treturn (\n\t\t\t<View style={styles.muteContainer}>\n\t\t\t\t{isMuted && muteExpiry ? (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t{ color: this.props.colourBrandingMain },\n\t\t\t\t\t\t\tstyles.mutedForText,\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t\t{mutedFor}\n\t\t\t\t\t</Text>\n\t\t\t\t) : null}\n\t\t\t\t<InlineButton\n\t\t\t\t\tonPress={isMuted ? this.onUnmute : this.onMute}\n\t\t\t\t\tcolor=\"#fff\"\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\t{ borderColor: this.props.colourBrandingMain },\n\t\t\t\t\t\tstyles.muteButton,\n\t\t\t\t\t]}\n\t\t\t\t\tdisabled={processing}\n\t\t\t\t\tdisabledOpacity\n\t\t\t\t\tnoText\n\t\t\t\t>\n\t\t\t\t\t<View style={styles.muteButtonInner}>\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tname={isMuted ? \"bell-o\" : \"bell-slash-o\"}\n\t\t\t\t\t\t\ttype={\"font-awesome\"}\n\t\t\t\t\t\t\ticonStyle={[\n\t\t\t\t\t\t\t\t{ color: this.props.colourBrandingMain },\n\t\t\t\t\t\t\t\tstyles.muteButtonIcon,\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t{ color: this.props.colourBrandingMain },\n\t\t\t\t\t\t\t\tstyles.muteButtonText,\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{isMuted ? \"Unmute\" : \"Mute\"}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</View>\n\t\t\t\t</InlineButton>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trenderComments() {\n\t\tif (this.state.commentsLoading) {\n\t\t\treturn (\n\t\t\t\t<View style={styles.commentSection}>\n\t\t\t\t\t<Spinner color={this.props.colourBrandingMain} />\n\t\t\t\t</View>\n\t\t\t);\n\t\t}\n\t\tif (this.isEmpty() && !this.state.addingComment) {\n\t\t\tif (_.includes(this.props.user.hidden, \"addComment\")) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (!_.isNil(this.props.placeHolder) && _.isEmpty(this.props.placeHolder))\n\t\t\t\treturn null;\n\t\t\treturn (\n\t\t\t\t<View style={styles.commentSection}>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\tstyles.commentsEmpty,\n\t\t\t\t\t\t\t{ fontSize: this.getAdjustedSize(15) },\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t\t{_.isNil(this.props.placeHolder)\n\t\t\t\t\t\t\t? \"Be the first to add a comment!\"\n\t\t\t\t\t\t\t: this.props.placeHolder}\n\t\t\t\t\t</Text>\n\t\t\t\t</View>\n\t\t\t);\n\t\t}\n\t\tlet source = [...this.state.comments];\n\t\tif (this.props.reverseOrder) {\n\t\t\tsource = source.reverse();\n\t\t}\n\t\tif (!this.props.showReplies && !this.props.threadId) {\n\t\t\tsource = _.filter(source, (c) => {\n\t\t\t\treturn !c.ParentId;\n\t\t\t});\n\t\t}\n\t\treturn (\n\t\t\t<View style={styles.commentSection}>\n\t\t\t\t{!this.isEmpty() && (\n\t\t\t\t\t<View style={styles.commentSectionTitleRow}>\n\t\t\t\t\t\t<View style={{ alignItems: \"flex-end\" }}>\n\t\t\t\t\t\t\t{this.renderMute()}\n\t\t\t\t\t\t\t{!this.props.hideAddComment && this.state.comments.length > 2 && (\n\t\t\t\t\t\t\t\t<TouchableOpacity onPress={this.onGoToAdd.bind(this)}>\n\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t\tstyles.goToText,\n\t\t\t\t\t\t\t\t\t\t\t{ color: this.props.colourBrandingMain },\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\t\tAdd a comment\n\t\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)}\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\tstyles.commentCount,\n\t\t\t\t\t\t\t\t{ fontSize: this.getAdjustedSize(15) },\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.state.comments.length}\n\t\t\t\t\t\t\t{` comment${getPluralS(this.state.comments.length)}`}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</View>\n\t\t\t\t)}\n\t\t\t\t{this.props.reverseOrder && this.state.addingComment && (\n\t\t\t\t\t<Spinner color={this.props.colourBrandingMain} />\n\t\t\t\t)}\n\t\t\t\t{source.map((c) => {\n\t\t\t\t\treturn this.renderComment(c);\n\t\t\t\t})}\n\t\t\t\t{!this.props.reverseOrder && this.state.addingComment && (\n\t\t\t\t\t<Spinner color={this.props.colourBrandingMain} />\n\t\t\t\t)}\n\t\t\t</View>\n\t\t);\n\t}\n\n\trenderCommentImagePopup() {\n\t\treturn (\n\t\t\t<ImagePopup\n\t\t\t\tvisible={this.state.imagePopupOpen}\n\t\t\t\timages={this.state.imagePopupSource}\n\t\t\t\tonClose={this.closeCommentGallery.bind(this)}\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderReportLoading() {\n\t\tif (!this.state.reportLoading) return null;\n\t\treturn (\n\t\t\t<View style={styles.reportLoadingContainer}>\n\t\t\t\t<Spinner color={this.props.colourBrandingMain} />\n\t\t\t</View>\n\t\t);\n\t}\n\n\trender() {\n\t\tif (_.includes(this.props.user.hidden, \"viewComment\")) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={[styles.commentSectionOuter, this.props.style]}>\n\t\t\t\t{this.renderComments()}\n\t\t\t\t{this.renderReportLoading()}\n\t\t\t\t{this.renderCommentDeleteConfirm()}\n\t\t\t\t{this.renderCommentReportConfirm()}\n\t\t\t\t{this.renderCommentBlockConfirm()}\n\t\t\t\t{this.renderCommentUnblockConfirm()}\n\t\t\t\t{this.renderCommentReportStatus()}\n\t\t\t\t{this.renderCommentImagePopup()}\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = StyleSheet.create({\n\tcommentSectionOuter: {\n\t\tflex: 1,\n\t\tpaddingHorizontal: 16,\n\t},\n\tcommentSection: {\n\t\tflex: 1,\n\t\tpaddingVertical: 12,\n\t\tborderTopColor: LINEGREY,\n\t\tborderTopWidth: 1,\n\t},\n\tcommentCount: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tcolor: TEXT_DARKEST,\n\t\tflex: 1,\n\t\tmarginTop: 4,\n\t},\n\tcomment: {\n\t\tmarginTop: 16,\n\t},\n\tcommentFlex: {\n\t\tflexDirection: \"row\",\n\t},\n\tcommentProfilePic: {\n\t\tmarginRight: 8,\n\t},\n\tcommentBlock: {\n\t\tflex: 1,\n\t\tbackgroundColor: BG_GREY,\n\t\tborderRadius: 5,\n\t\tpadding: 8,\n\t},\n\tcommentTitleRow: {\n\t\tflexDirection: \"row-reverse\",\n\t\talignItems: \"center\",\n\t},\n\tcommentButtonContainer: {\n\t\twidth: 24,\n\t\theight: 24,\n\t\tborderRadius: 12,\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t},\n\tcommentButtonIcon: {\n\t\tfontSize: 13,\n\t\tcolor: \"#fff\",\n\t},\n\tcommentName: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tcolor: TEXT_DARKEST,\n\t\tflex: 1,\n\t},\n\tcommentText: {\n\t\tmarginTop: 8,\n\t\tfontFamily: \"sf-regular\",\n\t\tcolor: TEXT_DARKEST,\n\t},\n\tcommentBottom: {\n\t\tflexDirection: \"row-reverse\",\n\t\tjustifyContent: \"space-between\",\n\t\talignItems: \"center\",\n\t},\n\tcommentTime: {\n\t\tfontFamily: \"sf-regular\",\n\t\tmarginTop: 4,\n\t\tcolor: TEXT_LIGHT,\n\t\ttextAlign: \"right\",\n\t},\n\tcommentReplies: {\n\t\tflex: 1,\n\t\tpaddingLeft: 48,\n\t},\n\tcommentRepliesText: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 15,\n\t},\n\tmultiReplyContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tpaddingVertical: 4,\n\t},\n\tcommentImageContainer: {\n\t\tmarginTop: 8,\n\t\twidth: 60,\n\t\theight: 60,\n\t},\n\tcommentImage: {\n\t\twidth: 60,\n\t\theight: 60,\n\t\tborderRadius: 2,\n\t},\n\tcommentsEmpty: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tcolor: TEXT_DARKEST,\n\t},\n\tcommentSectionTitleRow: {\n\t\tflexDirection: \"row-reverse\",\n\t},\n\tcommentReportText: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 14,\n\t\tpaddingHorizontal: 22,\n\t\ttextAlign: \"center\",\n\t},\n\treportLoadingContainer: {\n\t\tpaddingVertical: 10,\n\t},\n\tgoToText: {\n\t\tmarginTop: 4,\n\t},\n\tmuteSpinnerContainer: {\n\t\twidth: 100,\n\t\tmarginBottom: 6,\n\t},\n\tmuteContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"flex-end\",\n\t\tmarginBottom: 6,\n\t},\n\tmutedForText: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 13,\n\t\tmarginRight: 8,\n\t},\n\tmuteButton: {\n\t\tborderWidth: 1,\n\t\tpaddingHorizontal: 8,\n\t},\n\tmuteButtonInner: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t},\n\tmuteButtonIcon: {\n\t\tfontSize: 14,\n\t},\n\tmuteButtonText: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 14,\n\t\tmarginLeft: 6,\n\t},\n});\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t\tuser: state.user,\n\t\tnotificationsForComments: getSiteSettingFromState(\n\t\t\tstate,\n\t\t\t\"NotificationsForComments\",\n\t\t\tfalse,\n\t\t),\n\t\tblockedUsers: state.userSettings.blockedUsers || [],\n\t};\n};\n\nconst commentSection = connect(\n\tmapStateToProps,\n\t{ blockUser, unblockUser },\n\tnull,\n\t{ forwardRef: true },\n)(CommentSection);\nexport { commentSection as CommentSection };\n"],"mappings":";;;AAAA,OA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ACb,CAAC;EACDX,cAAc,EAAE;IACfzB,QAAQ,EAAE;EACX,CAAC;EACD0B,cAAc,EAAE;IACf0B,UAAU,EAAE,aAAa;IACzBpD,QAAQ,EAAE,EAAE;IACZjG,UAAU,EAAE;EACb;AACD,CAAC,CAAC;AAEF,MAAMiK,eAAe,GAAIzO,KAAK,IAAK;EAClC,OAAO;IACN2D,kBAAkB,EAAElF,8BAA8B,CAACuB,KAAK,CAAC;IACzD6C,IAAI,EAAE7C,KAAK,CAAC6C,IAAI;IAChBN,wBAAwB,EAAEjE,uBAAuB,CAChD0B,KAAK,EACL,0BAA0B,EAC1B,KACD,CAAC;IACD4C,YAAY,EAAE5C,KAAK,CAAC0O,YAAY,CAAC9L,YAAY,IAAI;EAClD,CAAC;AACF,CAAC;AAED,MAAMyJ,cAAc,GAAGpO,OAAO,CAC7BwQ,eAAe,EACf;EAAEzP,SAAS;EAAEC;AAAY,CAAC,EAC1B,IAAI,EACJ;EAAE0P,UAAU,EAAE;AAAK,CACpB,CAAC,CAACnP,cAAc,CAAC;AACjB,SAAS6M,cAAc,IAAI7M,cAAc","ignoreList":[]}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import React, { PureComponent } from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
import { Text } from "./Text";
|
|
4
|
-
import _ from "lodash";
|
|
5
|
-
import { connect } from "react-redux";
|
|
6
|
-
import { getMainBrandingColourFromState, TEXT_DARK } from "../colours";
|
|
7
|
-
import { Spinner } from "./Spinner";
|
|
8
|
-
import { InlineButton } from "./InlineButton";
|
|
9
|
-
import { MiddlePopup } from "./MiddlePopup";
|
|
10
|
-
class ConfirmPopup extends PureComponent {
|
|
11
|
-
render() {
|
|
12
|
-
return /*#__PURE__*/React.createElement(MiddlePopup, {
|
|
13
|
-
visible: this.props.visible,
|
|
14
|
-
onClose: this.props.onClose,
|
|
15
|
-
style: [styles.popup, this.props.headerContent && {
|
|
16
|
-
paddingTop: 16
|
|
17
|
-
}]
|
|
18
|
-
}, this.props.headerContent && /*#__PURE__*/React.createElement(View, {
|
|
19
|
-
style: {
|
|
20
|
-
width: 350,
|
|
21
|
-
marginBottom: 16
|
|
22
|
-
}
|
|
23
|
-
}, this.props.headerContent), !_.isEmpty(this.props.text) && /*#__PURE__*/React.createElement(Text, {
|
|
24
|
-
style: [styles.text, this.props.textAlignLeft && styles.textAlignLeft]
|
|
25
|
-
}, this.props.text), !_.isEmpty(this.props.subtext) && /*#__PURE__*/React.createElement(Text, {
|
|
26
|
-
style: [styles.subtext, this.props.textAlignLeft && styles.textAlignLeft]
|
|
27
|
-
}, this.props.subtext), this.props.extraContent && /*#__PURE__*/React.createElement(View, {
|
|
28
|
-
style: {
|
|
29
|
-
width: 350,
|
|
30
|
-
marginTop: 16
|
|
31
|
-
}
|
|
32
|
-
}, this.props.extraContent), this.props.children, /*#__PURE__*/React.createElement(View, {
|
|
33
|
-
style: [styles.buttonsContainer, this.props.verticalButtons && styles.verticalButtons]
|
|
34
|
-
}, this.props.buttonsLoading && /*#__PURE__*/React.createElement(View, {
|
|
35
|
-
style: styles.loadingContainer
|
|
36
|
-
}, /*#__PURE__*/React.createElement(Spinner, null)), !this.props.hideNo && !this.props.buttonsLoading && /*#__PURE__*/React.createElement(InlineButton, {
|
|
37
|
-
onPress: this.props.onCancel,
|
|
38
|
-
color: "#fff",
|
|
39
|
-
style: [styles.button, styles.noButton, this.props.verticalButtons && styles.buttonVertical, {
|
|
40
|
-
borderColor: this.props.colourBrandingMain
|
|
41
|
-
}],
|
|
42
|
-
textStyle: {
|
|
43
|
-
color: this.props.colourBrandingMain
|
|
44
|
-
},
|
|
45
|
-
large: true
|
|
46
|
-
}, this.props.noText || "No"), !this.props.hideYes && !this.props.buttonsLoading && /*#__PURE__*/React.createElement(InlineButton, {
|
|
47
|
-
onPress: this.props.onConfirm,
|
|
48
|
-
color: this.props.colourBrandingMain,
|
|
49
|
-
style: [styles.button, this.props.verticalButtons && styles.buttonVertical],
|
|
50
|
-
large: true
|
|
51
|
-
}, this.props.yesText || "Yes")));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const styles = {
|
|
55
|
-
popup: {
|
|
56
|
-
padding: 24,
|
|
57
|
-
margin: 16,
|
|
58
|
-
maxWidth: 350
|
|
59
|
-
},
|
|
60
|
-
text: {
|
|
61
|
-
fontFamily: "sf-bold",
|
|
62
|
-
fontSize: 20,
|
|
63
|
-
color: TEXT_DARK,
|
|
64
|
-
textAlign: "center"
|
|
65
|
-
},
|
|
66
|
-
subtext: {
|
|
67
|
-
fontFamily: "sf-regular",
|
|
68
|
-
fontSize: 17,
|
|
69
|
-
color: TEXT_DARK,
|
|
70
|
-
textAlign: "center"
|
|
71
|
-
},
|
|
72
|
-
textAlignLeft: {
|
|
73
|
-
textAlign: "left"
|
|
74
|
-
},
|
|
75
|
-
buttonsContainer: {
|
|
76
|
-
flexDirection: "row",
|
|
77
|
-
marginTop: 24
|
|
78
|
-
},
|
|
79
|
-
loadingContainer: {
|
|
80
|
-
height: 40,
|
|
81
|
-
justifyContent: "center",
|
|
82
|
-
alignItems: "center"
|
|
83
|
-
},
|
|
84
|
-
button: {
|
|
85
|
-
width: 120,
|
|
86
|
-
paddingHorizontal: 2
|
|
87
|
-
},
|
|
88
|
-
noButton: {
|
|
89
|
-
borderWidth: 1,
|
|
90
|
-
marginRight: 16
|
|
91
|
-
},
|
|
92
|
-
buttonVertical: {
|
|
93
|
-
width: "100%",
|
|
94
|
-
marginTop: 16,
|
|
95
|
-
marginRight: 0,
|
|
96
|
-
paddingHorizontal: 8
|
|
97
|
-
},
|
|
98
|
-
verticalButtons: {
|
|
99
|
-
flexDirection: "column-reverse"
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const mapStateToProps = state => {
|
|
103
|
-
return {
|
|
104
|
-
colourBrandingMain: getMainBrandingColourFromState(state)
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
const confirmPopup = connect(mapStateToProps, {})(ConfirmPopup);
|
|
108
|
-
export { confirmPopup as ConfirmPopup };
|
|
109
|
-
//# sourceMappingURL=ConfirmPopup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","View","Text","_","connect","getMainBrandingColourFromState","TEXT_DARK","Spinner","InlineButton","MiddlePopup","ConfirmPopup","render","createElement","visible","props","onClose","style","styles","popup","headerContent","paddingTop","width","marginBottom","isEmpty","text","textAlignLeft","subtext","extraContent","marginTop","children","buttonsContainer","verticalButtons","buttonsLoading","loadingContainer","hideNo","onPress","onCancel","color","button","noButton","buttonVertical","borderColor","colourBrandingMain","textStyle","large","noText","hideYes","onConfirm","yesText","padding","margin","maxWidth","fontFamily","fontSize","textAlign","flexDirection","height","justifyContent","alignItems","paddingHorizontal","borderWidth","marginRight","mapStateToProps","state","confirmPopup"],"sources":["ConfirmPopup.js"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport { View } from \"react-native\";\nimport { Text } from \"./Text\";\nimport _ from \"lodash\";\nimport { connect } from \"react-redux\";\nimport { getMainBrandingColourFromState, TEXT_DARK } from \"../colours\";\nimport { Spinner } from \"./Spinner\";\nimport { InlineButton } from \"./InlineButton\";\nimport { MiddlePopup } from \"./MiddlePopup\";\n\nclass ConfirmPopup extends PureComponent {\n\trender() {\n\t\treturn (\n\t\t\t<MiddlePopup\n\t\t\t\tvisible={this.props.visible}\n\t\t\t\tonClose={this.props.onClose}\n\t\t\t\tstyle={[styles.popup, this.props.headerContent && { paddingTop: 16 }]}\n\t\t\t>\n\t\t\t\t{this.props.headerContent && (\n\t\t\t\t\t<View style={{ width: 350, marginBottom: 16 }}>\n\t\t\t\t\t\t{this.props.headerContent}\n\t\t\t\t\t</View>\n\t\t\t\t)}\n\t\t\t\t{!_.isEmpty(this.props.text) && (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\tstyles.text,\n\t\t\t\t\t\t\tthis.props.textAlignLeft && styles.textAlignLeft,\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.props.text}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{!_.isEmpty(this.props.subtext) && (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\tstyles.subtext,\n\t\t\t\t\t\t\tthis.props.textAlignLeft && styles.textAlignLeft,\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.props.subtext}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{this.props.extraContent && (\n\t\t\t\t\t<View style={{ width: 350, marginTop: 16 }}>\n\t\t\t\t\t\t{this.props.extraContent}\n\t\t\t\t\t</View>\n\t\t\t\t)}\n\t\t\t\t{this.props.children}\n\t\t\t\t<View\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\tstyles.buttonsContainer,\n\t\t\t\t\t\tthis.props.verticalButtons && styles.verticalButtons,\n\t\t\t\t\t]}\n\t\t\t\t>\n\t\t\t\t\t{this.props.buttonsLoading && (\n\t\t\t\t\t\t<View style={styles.loadingContainer}>\n\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t</View>\n\t\t\t\t\t)}\n\t\t\t\t\t{!this.props.hideNo && !this.props.buttonsLoading && (\n\t\t\t\t\t\t<InlineButton\n\t\t\t\t\t\t\tonPress={this.props.onCancel}\n\t\t\t\t\t\t\tcolor=\"#fff\"\n\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\tstyles.button,\n\t\t\t\t\t\t\t\tstyles.noButton,\n\t\t\t\t\t\t\t\tthis.props.verticalButtons && styles.buttonVertical,\n\t\t\t\t\t\t\t\t{ borderColor: this.props.colourBrandingMain },\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\ttextStyle={{ color: this.props.colourBrandingMain }}\n\t\t\t\t\t\t\tlarge\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.props.noText || \"No\"}\n\t\t\t\t\t\t</InlineButton>\n\t\t\t\t\t)}\n\t\t\t\t\t{!this.props.hideYes && !this.props.buttonsLoading && (\n\t\t\t\t\t\t<InlineButton\n\t\t\t\t\t\t\tonPress={this.props.onConfirm}\n\t\t\t\t\t\t\tcolor={this.props.colourBrandingMain}\n\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\tstyles.button,\n\t\t\t\t\t\t\t\tthis.props.verticalButtons && styles.buttonVertical,\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\tlarge\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.props.yesText || \"Yes\"}\n\t\t\t\t\t\t</InlineButton>\n\t\t\t\t\t)}\n\t\t\t\t</View>\n\t\t\t</MiddlePopup>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tpopup: {\n\t\tpadding: 24,\n\t\tmargin: 16,\n\t\tmaxWidth: 350,\n\t},\n\ttext: {\n\t\tfontFamily: \"sf-bold\",\n\t\tfontSize: 20,\n\t\tcolor: TEXT_DARK,\n\t\ttextAlign: \"center\",\n\t},\n\tsubtext: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 17,\n\t\tcolor: TEXT_DARK,\n\t\ttextAlign: \"center\",\n\t},\n\ttextAlignLeft: {\n\t\ttextAlign: \"left\",\n\t},\n\tbuttonsContainer: {\n\t\tflexDirection: \"row\",\n\t\tmarginTop: 24,\n\t},\n\tloadingContainer: {\n\t\theight: 40,\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"center\",\n\t},\n\tbutton: {\n\t\twidth: 120,\n\t\tpaddingHorizontal: 2,\n\t},\n\tnoButton: {\n\t\tborderWidth: 1,\n\t\tmarginRight: 16,\n\t},\n\tbuttonVertical: {\n\t\twidth: \"100%\",\n\t\tmarginTop: 16,\n\t\tmarginRight: 0,\n\t\tpaddingHorizontal: 8,\n\t},\n\tverticalButtons: {\n\t\tflexDirection: \"column-reverse\",\n\t},\n};\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t};\n};\n\nconst confirmPopup = connect(mapStateToProps, {})(ConfirmPopup);\nexport { confirmPopup as ConfirmPopup };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,8BAA8B,EAAEC,SAAS,QAAQ,YAAY;AACtE,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,WAAW,QAAQ,eAAe;AAE3C,MAAMC,YAAY,SAASV,aAAa,CAAC;EACxCW,MAAMA,CAAA,EAAG;IACR,oBACCZ,KAAA,CAAAa,aAAA,CAACH,WAAW;MACXI,OAAO,EAAE,IAAI,CAACC,KAAK,CAACD,OAAQ;MAC5BE,OAAO,EAAE,IAAI,CAACD,KAAK,CAACC,OAAQ;MAC5BC,KAAK,EAAE,CAACC,MAAM,CAACC,KAAK,EAAE,IAAI,CAACJ,KAAK,CAACK,aAAa,IAAI;QAAEC,UAAU,EAAE;MAAG,CAAC;IAAE,GAErE,IAAI,CAACN,KAAK,CAACK,aAAa,iBACxBpB,KAAA,CAAAa,aAAA,CAACX,IAAI;MAACe,KAAK,EAAE;QAAEK,KAAK,EAAE,GAAG;QAAEC,YAAY,EAAE;MAAG;IAAE,GAC5C,IAAI,CAACR,KAAK,CAACK,aACP,CACN,EACA,CAAChB,CAAC,CAACoB,OAAO,CAAC,IAAI,CAACT,KAAK,CAACU,IAAI,CAAC,iBAC3BzB,KAAA,CAAAa,aAAA,CAACV,IAAI;MACJc,KAAK,EAAE,CACNC,MAAM,CAACO,IAAI,EACX,IAAI,CAACV,KAAK,CAACW,aAAa,IAAIR,MAAM,CAACQ,aAAa;IAC/C,GAED,IAAI,CAACX,KAAK,CAACU,IACP,CACN,EACA,CAAC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AAM,EAAE;IACPjB,KAAK,EAAE,GAAG;IACVsC,iBAAiB,EAAE;EACpB,CAAC;EACDpB,QAAQ,EAAE;IACTqB,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE;EACd,CAAC;EACDrB,cAAc,EAAE;IACfnB,KAAK,EAAE,MAAM;IACbO,SAAS,EAAE,EAAE;IACbiC,WAAW,EAAE,CAAC;IACdF,iBAAiB,EAAE;EACpB,CAAC;EACD5B,eAAe,EAAE;IAChBwB,aAAa,EAAE;EAChB;AACD,CAAC;AAED,MAAMO,eAAe,GAAIC,KAAK,IAAK;EAClC,OAAO;IACNrB,kBAAkB,EAAErC,8BAA8B,CAAC0D,KAAK;EACzD,CAAC;AACF,CAAC;AAED,MAAMC,YAAY,GAAG5D,OAAO,CAAC0D,eAAe,EAAE,CAAC,CAAC,CAAC,CAACpD,YAAY,CAAC;AAC/D,SAASsD,YAAY,IAAItD,YAAY","ignoreList":[]}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React, { PureComponent } from "react";
|
|
2
|
-
import { Text } from "./Text";
|
|
3
|
-
import { connect } from "react-redux";
|
|
4
|
-
import { FontAwesome } from "./Icon";
|
|
5
|
-
import { COLOUR_GREEN, TEXT_DARK, getMainBrandingColourFromState } from "../colours";
|
|
6
|
-
import { MiddlePopup } from "./MiddlePopup";
|
|
7
|
-
import { InlineButton } from "./InlineButton";
|
|
8
|
-
class ConfirmationPopup extends PureComponent {
|
|
9
|
-
render() {
|
|
10
|
-
return /*#__PURE__*/React.createElement(MiddlePopup, {
|
|
11
|
-
visible: this.props.visible,
|
|
12
|
-
onClose: this.props.onClose,
|
|
13
|
-
style: [styles.popup, this.props.style]
|
|
14
|
-
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
15
|
-
style: styles.icon,
|
|
16
|
-
name: "check-circle"
|
|
17
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
18
|
-
style: styles.text
|
|
19
|
-
}, this.props.confirmText), this.props.onPressAction && /*#__PURE__*/React.createElement(InlineButton, {
|
|
20
|
-
onPress: this.props.onPressAction,
|
|
21
|
-
color: this.props.colourBrandingMain,
|
|
22
|
-
style: [styles.button, this.props.largeButtons && styles.largeButton],
|
|
23
|
-
large: this.props.largeButtons
|
|
24
|
-
}, this.props.repeatText), /*#__PURE__*/React.createElement(InlineButton, {
|
|
25
|
-
onPress: this.props.onClose,
|
|
26
|
-
color: "#fff",
|
|
27
|
-
style: [styles.button, styles.closeButton, this.props.largeButtons && styles.largeButton, {
|
|
28
|
-
borderColor: this.props.colourBrandingMain
|
|
29
|
-
}],
|
|
30
|
-
textStyle: {
|
|
31
|
-
color: this.props.colourBrandingMain
|
|
32
|
-
},
|
|
33
|
-
large: this.props.largeButtons
|
|
34
|
-
}, "Close"));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
const styles = {
|
|
38
|
-
popup: {
|
|
39
|
-
width: 280,
|
|
40
|
-
paddingVertical: 40
|
|
41
|
-
},
|
|
42
|
-
icon: {
|
|
43
|
-
fontSize: 52,
|
|
44
|
-
color: COLOUR_GREEN
|
|
45
|
-
},
|
|
46
|
-
text: {
|
|
47
|
-
fontFamily: "sf-bold",
|
|
48
|
-
fontSize: 24,
|
|
49
|
-
lineHeight: 24,
|
|
50
|
-
color: TEXT_DARK,
|
|
51
|
-
textAlign: "center",
|
|
52
|
-
marginTop: 8
|
|
53
|
-
},
|
|
54
|
-
button: {
|
|
55
|
-
width: 150,
|
|
56
|
-
marginTop: 20
|
|
57
|
-
},
|
|
58
|
-
closeButton: {
|
|
59
|
-
borderWidth: 1
|
|
60
|
-
},
|
|
61
|
-
largeButton: {
|
|
62
|
-
width: 250
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const mapStateToProps = state => {
|
|
66
|
-
return {
|
|
67
|
-
colourBrandingMain: getMainBrandingColourFromState(state)
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
const confirmationPopup = connect(mapStateToProps, {})(ConfirmationPopup);
|
|
71
|
-
export { confirmationPopup as ConfirmationPopup };
|
|
72
|
-
//# sourceMappingURL=ConfirmationPopup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","Text","connect","FontAwesome","COLOUR_GREEN","TEXT_DARK","getMainBrandingColourFromState","MiddlePopup","InlineButton","ConfirmationPopup","render","createElement","visible","props","onClose","style","styles","popup","icon","name","text","confirmText","onPressAction","onPress","color","colourBrandingMain","button","largeButtons","largeButton","large","repeatText","closeButton","borderColor","textStyle","width","paddingVertical","fontSize","fontFamily","lineHeight","textAlign","marginTop","borderWidth","mapStateToProps","state","confirmationPopup"],"sources":["ConfirmationPopup.js"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport { Text } from \"./Text\";\nimport { connect } from \"react-redux\";\nimport { FontAwesome } from \"./Icon\";\nimport {\n\tCOLOUR_GREEN,\n\tTEXT_DARK,\n\tgetMainBrandingColourFromState,\n} from \"../colours\";\nimport { MiddlePopup } from \"./MiddlePopup\";\nimport { InlineButton } from \"./InlineButton\";\n\nclass ConfirmationPopup extends PureComponent {\n\trender() {\n\t\treturn (\n\t\t\t<MiddlePopup\n\t\t\t\tvisible={this.props.visible}\n\t\t\t\tonClose={this.props.onClose}\n\t\t\t\tstyle={[styles.popup, this.props.style]}\n\t\t\t>\n\t\t\t\t<FontAwesome style={styles.icon} name=\"check-circle\" />\n\t\t\t\t<Text style={styles.text}>{this.props.confirmText}</Text>\n\t\t\t\t{this.props.onPressAction && (\n\t\t\t\t\t<InlineButton\n\t\t\t\t\t\tonPress={this.props.onPressAction}\n\t\t\t\t\t\tcolor={this.props.colourBrandingMain}\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\tstyles.button,\n\t\t\t\t\t\t\tthis.props.largeButtons && styles.largeButton,\n\t\t\t\t\t\t]}\n\t\t\t\t\t\tlarge={this.props.largeButtons}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.props.repeatText}\n\t\t\t\t\t</InlineButton>\n\t\t\t\t)}\n\t\t\t\t<InlineButton\n\t\t\t\t\tonPress={this.props.onClose}\n\t\t\t\t\tcolor=\"#fff\"\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\tstyles.button,\n\t\t\t\t\t\tstyles.closeButton,\n\t\t\t\t\t\tthis.props.largeButtons && styles.largeButton,\n\t\t\t\t\t\t{ borderColor: this.props.colourBrandingMain },\n\t\t\t\t\t]}\n\t\t\t\t\ttextStyle={{ color: this.props.colourBrandingMain }}\n\t\t\t\t\tlarge={this.props.largeButtons}\n\t\t\t\t>\n\t\t\t\t\tClose\n\t\t\t\t</InlineButton>\n\t\t\t</MiddlePopup>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tpopup: {\n\t\twidth: 280,\n\t\tpaddingVertical: 40,\n\t},\n\ticon: {\n\t\tfontSize: 52,\n\t\tcolor: COLOUR_GREEN,\n\t},\n\ttext: {\n\t\tfontFamily: \"sf-bold\",\n\t\tfontSize: 24,\n\t\tlineHeight: 24,\n\t\tcolor: TEXT_DARK,\n\t\ttextAlign: \"center\",\n\t\tmarginTop: 8,\n\t},\n\tbutton: {\n\t\twidth: 150,\n\t\tmarginTop: 20,\n\t},\n\tcloseButton: {\n\t\tborderWidth: 1,\n\t},\n\tlargeButton: {\n\t\twidth: 250,\n\t},\n};\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t};\n};\n\nconst confirmationPopup = connect(mapStateToProps, {})(ConfirmationPopup);\nexport { confirmationPopup as ConfirmationPopup };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,WAAW,QAAQ,QAAQ;AACpC,SACCC,YAAY,EACZC,SAAS,EACTC,8BAA8B,QACxB,YAAY;AACnB,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,QAAQ,gBAAgB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MACFQ,SAAS,EAAE;QAAET,KAAK,EAAE,IAAI,CAACX,KAAK,CAACY;MAAmB,CAAE;MACpDI,KAAK,EAAE,IAAI,CAAChB,KAAK,CAACc;IAAa,GAC/B,OAEa,CACF,CAAC;EAEhB;AACD;AAEA,MAAMX,MAAM,GAAG;EACdC,KAAK,EAAE;IACNiB,KAAK,EAAE,GAAG;IACVC,eAAe,EAAE;EAClB,CAAC;EACDjB,IAAI,EAAE;IACLkB,QAAQ,EAAE,EAAE;IACZZ,KAAK,EAAEpB;EACR,CAAC;EACDgB,IAAI,EAAE;IACLiB,UAAU,EAAE,SAAS;IACrBD,QAAQ,EAAE,EAAE;IACZE,UAAU,EAAE,EAAE;IACdd,KAAK,EAAEnB,SAAS;IAChBkC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE;EACZ,CAAC;EACDd,MAAM,EAAE;IACPQ,KAAK,EAAE,GAAG;IACVM,SAAS,EAAE;EACZ,CAAC;EACDT,WAAW,EAAE;IACZU,WAAW,EAAE;EACd,CAAC;EACDb,WAAW,EAAE;IACZM,KAAK,EAAE;EACR;AACD,CAAC;AAED,MAAMQ,eAAe,GAAIC,KAAK,IAAK;EAClC,OAAO;IACNlB,kBAAkB,EAAEnB,8BAA8B,CAACqC,KAAK;EACzD,CAAC;AACF,CAAC;AAED,MAAMC,iBAAiB,GAAG1C,OAAO,CAACwC,eAAe,EAAE,CAAC,CAAC,CAAC,CAACjC,iBAAiB,CAAC;AACzE,SAASmC,iBAAiB,IAAInC,iBAAiB","ignoreList":[]}
|
|
@@ -1,253 +0,0 @@
|
|
|
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 React, { Component } from "react";
|
|
5
|
-
import { Text } from "@plusscommunities/pluss-core-app/components";
|
|
6
|
-
import { View, TouchableOpacity, StyleSheet, ActivityIndicator } from "react-native";
|
|
7
|
-
import { Icon } from "@rneui/themed";
|
|
8
|
-
import * as DocumentPicker from "expo-document-picker";
|
|
9
|
-
import { connect } from "react-redux";
|
|
10
|
-
import Config from "../config";
|
|
11
|
-
import { fileActions } from "../apis";
|
|
12
|
-
import { getValueOrDefault } from "../helper";
|
|
13
|
-
import { TEXT_DARK, getMainBrandingColourFromState } from "../colours";
|
|
14
|
-
const DEFAULT_DOCUMENT_NAME = "document";
|
|
15
|
-
class DocumentUploader extends Component {
|
|
16
|
-
constructor(...args) {
|
|
17
|
-
super(...args);
|
|
18
|
-
_defineProperty(this, "state", {
|
|
19
|
-
isUploading: false,
|
|
20
|
-
uploadProgress: 0
|
|
21
|
-
});
|
|
22
|
-
_defineProperty(this, "pickDocument", async () => {
|
|
23
|
-
const {
|
|
24
|
-
allowedTypes,
|
|
25
|
-
multiple
|
|
26
|
-
} = this.props;
|
|
27
|
-
try {
|
|
28
|
-
const result = await DocumentPicker.getDocumentAsync({
|
|
29
|
-
type: allowedTypes,
|
|
30
|
-
copyToCacheDirectory: true,
|
|
31
|
-
multiple: multiple || false
|
|
32
|
-
});
|
|
33
|
-
// console.log('pickDocument', JSON.stringify(result, null, 2));
|
|
34
|
-
|
|
35
|
-
if (!result.canceled) {
|
|
36
|
-
await this.handleDocumentPicked(result);
|
|
37
|
-
}
|
|
38
|
-
} catch (error) {
|
|
39
|
-
console.log("Document picker error:", error);
|
|
40
|
-
this.props.onUploadFailed(null, error.message);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
_defineProperty(this, "handleDocumentPicked", async documentResult => {
|
|
44
|
-
const {
|
|
45
|
-
assets
|
|
46
|
-
} = documentResult;
|
|
47
|
-
const {
|
|
48
|
-
userId
|
|
49
|
-
} = this.props;
|
|
50
|
-
try {
|
|
51
|
-
this.setState({
|
|
52
|
-
isUploading: true,
|
|
53
|
-
uploadProgress: 0
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// Process each asset in parallel
|
|
57
|
-
const uploadPromises = assets.map(async asset => {
|
|
58
|
-
const {
|
|
59
|
-
name,
|
|
60
|
-
uri,
|
|
61
|
-
mimeType
|
|
62
|
-
} = asset;
|
|
63
|
-
let file, fileExt;
|
|
64
|
-
if (name && name.includes(".")) {
|
|
65
|
-
const lastDotIndex = name.lastIndexOf(".");
|
|
66
|
-
file = name.substring(0, lastDotIndex);
|
|
67
|
-
fileExt = name.substring(lastDotIndex + 1);
|
|
68
|
-
} else {
|
|
69
|
-
// Fallback: extract extension from mimeType
|
|
70
|
-
file = name || "document";
|
|
71
|
-
if (mimeType) {
|
|
72
|
-
const mimeTypeParts = mimeType.split("/");
|
|
73
|
-
// Handle specific MIME type mappings
|
|
74
|
-
if (mimeType === "application/pdf") fileExt = "pdf";else if (mimeType.startsWith("image/")) fileExt = mimeTypeParts[1];else if (mimeType.startsWith("text/")) fileExt = "txt";else fileExt = mimeTypeParts[1] || "pdf";
|
|
75
|
-
} else {
|
|
76
|
-
fileExt = "pdf";
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Generate a unique filename if not provided
|
|
81
|
-
const fileName = `${getValueOrDefault(this.props.fileName, DEFAULT_DOCUMENT_NAME)}.${fileExt}`;
|
|
82
|
-
const uploadUri = fileActions.getUploadUrl(userId, fileName);
|
|
83
|
-
// console.log('handleDocumentPicked', JSON.stringify({ uploadUri, uri, name, fileName, mimeType, file, fileExt }, null, 2));
|
|
84
|
-
|
|
85
|
-
try {
|
|
86
|
-
// Notify parent component that upload has started for this file
|
|
87
|
-
this.props.onUploadStarted(uploadUri, uri, file, fileExt.toUpperCase());
|
|
88
|
-
const res = await fileActions.uploadUserMediaWithProgress(uri, uploadUri, progress => {
|
|
89
|
-
if (this.props.onUploadProgress) this.props.onUploadProgress(progress);
|
|
90
|
-
});
|
|
91
|
-
const fileUrl = Config.env.baseUploadsUrl + res.key;
|
|
92
|
-
this.props.onUploadSuccess(fileUrl, uploadUri);
|
|
93
|
-
console.log("Upload success", fileUrl);
|
|
94
|
-
return {
|
|
95
|
-
success: true,
|
|
96
|
-
url: fileUrl,
|
|
97
|
-
uploadUri
|
|
98
|
-
};
|
|
99
|
-
} catch (error) {
|
|
100
|
-
console.error(`Upload failed for ${name}:`, error);
|
|
101
|
-
this.props.onUploadFailed(uploadUri, error.message);
|
|
102
|
-
return {
|
|
103
|
-
success: false,
|
|
104
|
-
error,
|
|
105
|
-
uploadUri
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
// Wait for all uploads to complete
|
|
111
|
-
const results = await Promise.all(uploadPromises);
|
|
112
|
-
return results;
|
|
113
|
-
} catch (error) {
|
|
114
|
-
console.error("Document upload error:", error);
|
|
115
|
-
return [];
|
|
116
|
-
} finally {
|
|
117
|
-
this.setState({
|
|
118
|
-
isUploading: false,
|
|
119
|
-
uploadProgress: 0
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
_defineProperty(this, "renderUploadButton", () => {
|
|
124
|
-
const {
|
|
125
|
-
buttonTitle,
|
|
126
|
-
buttonStyle,
|
|
127
|
-
buttonTextStyle,
|
|
128
|
-
disabled
|
|
129
|
-
} = this.props;
|
|
130
|
-
const {
|
|
131
|
-
isUploading
|
|
132
|
-
} = this.state;
|
|
133
|
-
const mainColor = getMainBrandingColourFromState(this.props);
|
|
134
|
-
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
135
|
-
style: [styles.uploadButton, {
|
|
136
|
-
borderColor: mainColor
|
|
137
|
-
}, buttonStyle],
|
|
138
|
-
onPress: this.pickDocument,
|
|
139
|
-
disabled: isUploading || disabled,
|
|
140
|
-
activeOpacity: 0.7
|
|
141
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
142
|
-
style: styles.buttonContent
|
|
143
|
-
}, isUploading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
144
|
-
color: mainColor
|
|
145
|
-
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
146
|
-
name: "attachment",
|
|
147
|
-
type: "entypo",
|
|
148
|
-
color: mainColor,
|
|
149
|
-
size: 18,
|
|
150
|
-
style: styles.icon
|
|
151
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
152
|
-
style: [styles.buttonText, {
|
|
153
|
-
color: mainColor
|
|
154
|
-
}, buttonTextStyle]
|
|
155
|
-
}, buttonTitle)));
|
|
156
|
-
});
|
|
157
|
-
_defineProperty(this, "renderProgress", () => {
|
|
158
|
-
const {
|
|
159
|
-
uploadProgress
|
|
160
|
-
} = this.state;
|
|
161
|
-
if (uploadProgress <= 0 || uploadProgress >= 1) return null;
|
|
162
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
163
|
-
style: styles.progressContainer
|
|
164
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
165
|
-
style: styles.progressBar
|
|
166
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
167
|
-
style: [styles.progressFill, {
|
|
168
|
-
width: `${uploadProgress * 100}%`
|
|
169
|
-
}]
|
|
170
|
-
})), /*#__PURE__*/React.createElement(Text, {
|
|
171
|
-
style: styles.progressText
|
|
172
|
-
}, Math.round(uploadProgress * 100), "%"));
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
render() {
|
|
176
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
177
|
-
style: styles.container
|
|
178
|
-
}, this.renderUploadButton(), this.renderProgress());
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
_defineProperty(DocumentUploader, "defaultProps", {
|
|
182
|
-
allowedTypes: ["application/pdf"],
|
|
183
|
-
buttonTitle: "Upload Document",
|
|
184
|
-
buttonStyle: {},
|
|
185
|
-
buttonTextStyle: {},
|
|
186
|
-
onUploadStarted: () => {},
|
|
187
|
-
onUploadSuccess: () => {},
|
|
188
|
-
onUploadFailed: () => {},
|
|
189
|
-
onUploadProgress: null,
|
|
190
|
-
userId: null,
|
|
191
|
-
fileName: null,
|
|
192
|
-
disabled: false
|
|
193
|
-
});
|
|
194
|
-
const styles = StyleSheet.create({
|
|
195
|
-
container: {
|
|
196
|
-
marginVertical: 10
|
|
197
|
-
},
|
|
198
|
-
uploadButton: {
|
|
199
|
-
flexDirection: "row",
|
|
200
|
-
alignItems: "center",
|
|
201
|
-
justifyContent: "center",
|
|
202
|
-
paddingVertical: 8,
|
|
203
|
-
paddingHorizontal: 16,
|
|
204
|
-
borderRadius: 6,
|
|
205
|
-
backgroundColor: "#fff",
|
|
206
|
-
borderWidth: 1,
|
|
207
|
-
borderColor: "#007AFF"
|
|
208
|
-
},
|
|
209
|
-
buttonContent: {
|
|
210
|
-
flexDirection: "row",
|
|
211
|
-
alignItems: "center"
|
|
212
|
-
},
|
|
213
|
-
buttonText: {
|
|
214
|
-
color: "#fff",
|
|
215
|
-
fontSize: 16,
|
|
216
|
-
fontWeight: "500",
|
|
217
|
-
marginLeft: 8
|
|
218
|
-
},
|
|
219
|
-
icon: {
|
|
220
|
-
marginRight: 8
|
|
221
|
-
},
|
|
222
|
-
progressContainer: {
|
|
223
|
-
marginTop: 8,
|
|
224
|
-
alignItems: "center"
|
|
225
|
-
},
|
|
226
|
-
progressBar: {
|
|
227
|
-
height: 4,
|
|
228
|
-
width: "100%",
|
|
229
|
-
backgroundColor: "#E0E0E0",
|
|
230
|
-
borderRadius: 2,
|
|
231
|
-
overflow: "hidden"
|
|
232
|
-
},
|
|
233
|
-
progressFill: {
|
|
234
|
-
height: "100%",
|
|
235
|
-
backgroundColor: "#4CAF50"
|
|
236
|
-
},
|
|
237
|
-
progressText: {
|
|
238
|
-
marginTop: 4,
|
|
239
|
-
fontSize: 12,
|
|
240
|
-
color: TEXT_DARK
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
const mapStateToProps = state => {
|
|
244
|
-
const {
|
|
245
|
-
user
|
|
246
|
-
} = state;
|
|
247
|
-
return {
|
|
248
|
-
user,
|
|
249
|
-
colourBrandingMain: getMainBrandingColourFromState(state)
|
|
250
|
-
};
|
|
251
|
-
};
|
|
252
|
-
export default connect(mapStateToProps)(DocumentUploader);
|
|
253
|
-
//# sourceMappingURL=DocumentUploader.js.map
|