@plusscommunities/pluss-core-app 1.4.8 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/module/actions/FollowerActions.js +34 -0
  2. package/dist/module/actions/FollowerActions.js.map +1 -0
  3. package/dist/module/actions/MediaActions.js +20 -0
  4. package/dist/module/actions/MediaActions.js.map +1 -0
  5. package/dist/module/actions/ResidentActions.js +26 -0
  6. package/dist/module/actions/ResidentActions.js.map +1 -0
  7. package/dist/module/actions/UserActions.js +214 -0
  8. package/dist/module/actions/UserActions.js.map +1 -0
  9. package/dist/module/actions/index.js +5 -0
  10. package/dist/module/actions/index.js.map +1 -0
  11. package/dist/module/actions/types.js +14 -0
  12. package/dist/module/actions/types.js.map +1 -0
  13. package/dist/module/apis/analyticsActions.js +20 -0
  14. package/dist/module/apis/analyticsActions.js.map +1 -0
  15. package/dist/module/apis/contactActions.js +27 -0
  16. package/dist/module/apis/contactActions.js.map +1 -0
  17. package/dist/module/apis/eventActions.js +163 -0
  18. package/dist/module/apis/eventActions.js.map +1 -0
  19. package/dist/module/apis/fileActions.js +96 -0
  20. package/dist/module/apis/fileActions.js.map +1 -0
  21. package/dist/module/apis/followerActions.js +38 -0
  22. package/dist/module/apis/followerActions.js.map +1 -0
  23. package/dist/module/apis/index.js +11 -0
  24. package/dist/module/apis/index.js.map +1 -0
  25. package/dist/module/apis/notificationActions.js +60 -0
  26. package/dist/module/apis/notificationActions.js.map +1 -0
  27. package/dist/module/apis/profileActions.js +14 -0
  28. package/dist/module/apis/profileActions.js.map +1 -0
  29. package/dist/module/apis/reactionActions.js +78 -0
  30. package/dist/module/apis/reactionActions.js.map +1 -0
  31. package/dist/module/apis/typeActions.js +15 -0
  32. package/dist/module/apis/typeActions.js.map +1 -0
  33. package/dist/module/apis/userActions.js +104 -0
  34. package/dist/module/apis/userActions.js.map +1 -0
  35. package/{assets → dist/module/assets}/icons/reactions/heart.png +0 -0
  36. package/{assets → dist/module/assets}/icons/reactions/party.png +0 -0
  37. package/{assets → dist/module/assets}/icons/reactions/sad.png +0 -0
  38. package/{assets → dist/module/assets}/icons/reactions/smile.png +0 -0
  39. package/dist/module/colours.js +149 -0
  40. package/dist/module/colours.js.map +1 -0
  41. package/dist/module/components/AddButton.js +45 -0
  42. package/dist/module/components/AddButton.js.map +1 -0
  43. package/dist/module/components/Attachment.js +59 -0
  44. package/dist/module/components/Attachment.js.map +1 -0
  45. package/dist/module/components/AudienceSelectorLauncher.js +70 -0
  46. package/dist/module/components/AudienceSelectorLauncher.js.map +1 -0
  47. package/dist/module/components/AudienceSelectorPage.js +376 -0
  48. package/dist/module/components/AudienceSelectorPage.js.map +1 -0
  49. package/dist/module/components/BackButton.js +62 -0
  50. package/dist/module/components/BackButton.js.map +1 -0
  51. package/dist/module/components/CategoryTabs.js +171 -0
  52. package/dist/module/components/CategoryTabs.js.map +1 -0
  53. package/dist/module/components/CommentReply.js +363 -0
  54. package/dist/module/components/CommentReply.js.map +1 -0
  55. package/dist/module/components/CommentSection.js +785 -0
  56. package/dist/module/components/CommentSection.js.map +1 -0
  57. package/dist/module/components/ConfirmPopup.js +85 -0
  58. package/dist/module/components/ConfirmPopup.js.map +1 -0
  59. package/dist/module/components/ConfirmationPopup.js +77 -0
  60. package/dist/module/components/ConfirmationPopup.js.map +1 -0
  61. package/dist/module/components/DropDownItem.js +82 -0
  62. package/dist/module/components/DropDownItem.js.map +1 -0
  63. package/dist/module/components/DropDownMenu.js +46 -0
  64. package/dist/module/components/DropDownMenu.js.map +1 -0
  65. package/dist/module/components/EmptyStateMain.js +50 -0
  66. package/dist/module/components/EmptyStateMain.js.map +1 -0
  67. package/dist/module/components/EmptyStateWidget.js +52 -0
  68. package/dist/module/components/EmptyStateWidget.js.map +1 -0
  69. package/dist/module/components/FontScaleButton.js +37 -0
  70. package/dist/module/components/FontScaleButton.js.map +1 -0
  71. package/dist/module/components/FontScalePopup.js +77 -0
  72. package/dist/module/components/FontScalePopup.js.map +1 -0
  73. package/dist/module/components/FormCard.js +28 -0
  74. package/dist/module/components/FormCard.js.map +1 -0
  75. package/dist/module/components/FormCardSection.js +240 -0
  76. package/dist/module/components/FormCardSection.js.map +1 -0
  77. package/dist/module/components/FormCardSectionOptionLauncher.js +77 -0
  78. package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -0
  79. package/dist/module/components/FormattedText.js +145 -0
  80. package/dist/module/components/FormattedText.js.map +1 -0
  81. package/dist/module/components/GenericInput.js +161 -0
  82. package/dist/module/components/GenericInput.js.map +1 -0
  83. package/dist/module/components/GenericInputSection.js +174 -0
  84. package/dist/module/components/GenericInputSection.js.map +1 -0
  85. package/dist/module/components/Header.js +491 -0
  86. package/dist/module/components/Header.js.map +1 -0
  87. package/dist/module/components/ImagePopup.js +257 -0
  88. package/dist/module/components/ImagePopup.js.map +1 -0
  89. package/dist/module/components/ImageUploadProgress.js +72 -0
  90. package/dist/module/components/ImageUploadProgress.js.map +1 -0
  91. package/dist/module/components/ImageUploader.js +850 -0
  92. package/dist/module/components/ImageUploader.js.map +1 -0
  93. package/dist/module/components/InlineButton.js +72 -0
  94. package/dist/module/components/InlineButton.js.map +1 -0
  95. package/dist/module/components/Input.js +164 -0
  96. package/dist/module/components/Input.js.map +1 -0
  97. package/dist/module/components/LoadingCircles.js +224 -0
  98. package/dist/module/components/LoadingCircles.js.map +1 -0
  99. package/dist/module/components/LoadingIndicator.js +95 -0
  100. package/dist/module/components/LoadingIndicator.js.map +1 -0
  101. package/dist/module/components/LoadingStateWidget.js +51 -0
  102. package/dist/module/components/LoadingStateWidget.js.map +1 -0
  103. package/dist/module/components/MediaPlayer.js +453 -0
  104. package/dist/module/components/MediaPlayer.js.map +1 -0
  105. package/dist/module/components/MiddlePopup.js +46 -0
  106. package/dist/module/components/MiddlePopup.js.map +1 -0
  107. package/dist/module/components/PDFPopup.js +188 -0
  108. package/dist/module/components/PDFPopup.js.map +1 -0
  109. package/dist/module/components/PlussChat.js +997 -0
  110. package/dist/module/components/PlussChat.js.map +1 -0
  111. package/dist/module/components/PlussChatMessage.js +204 -0
  112. package/dist/module/components/PlussChatMessage.js.map +1 -0
  113. package/dist/module/components/PlussChatTime.js +66 -0
  114. package/dist/module/components/PlussChatTime.js.map +1 -0
  115. package/dist/module/components/Popup.js +138 -0
  116. package/dist/module/components/Popup.js.map +1 -0
  117. package/dist/module/components/PopupMenu.js +128 -0
  118. package/dist/module/components/PopupMenu.js.map +1 -0
  119. package/dist/module/components/PositionedImage.js +333 -0
  120. package/dist/module/components/PositionedImage.js.map +1 -0
  121. package/dist/module/components/ProfilePic.js +119 -0
  122. package/dist/module/components/ProfilePic.js.map +1 -0
  123. package/dist/module/components/RadioButton.js +84 -0
  124. package/dist/module/components/RadioButton.js.map +1 -0
  125. package/dist/module/components/Reaction.js +129 -0
  126. package/dist/module/components/Reaction.js.map +1 -0
  127. package/dist/module/components/Reactions.js +84 -0
  128. package/dist/module/components/Reactions.js.map +1 -0
  129. package/dist/module/components/SharingTools.js +162 -0
  130. package/dist/module/components/SharingTools.js.map +1 -0
  131. package/dist/module/components/Spinner.js +25 -0
  132. package/dist/module/components/Spinner.js.map +1 -0
  133. package/dist/module/components/StickyFooter.js +37 -0
  134. package/dist/module/components/StickyFooter.js.map +1 -0
  135. package/dist/module/components/TextStyle.js +34 -0
  136. package/dist/module/components/TextStyle.js.map +1 -0
  137. package/dist/module/components/Toggle.js +70 -0
  138. package/dist/module/components/Toggle.js.map +1 -0
  139. package/dist/module/components/TouchableSearchBar.js +73 -0
  140. package/dist/module/components/TouchableSearchBar.js.map +1 -0
  141. package/dist/module/components/UserListPopup.js +146 -0
  142. package/dist/module/components/UserListPopup.js.map +1 -0
  143. package/dist/module/components/UserListing.js +291 -0
  144. package/dist/module/components/UserListing.js.map +1 -0
  145. package/dist/module/components/VideoPopup.js +123 -0
  146. package/dist/module/components/VideoPopup.js.map +1 -0
  147. package/dist/module/components/WarningPopup.js +87 -0
  148. package/dist/module/components/WarningPopup.js.map +1 -0
  149. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +325 -0
  150. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -0
  151. package/dist/module/components/expo-image-picker-multiple/ImageTile.js +123 -0
  152. package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -0
  153. package/dist/module/components/index.js +53 -0
  154. package/dist/module/components/index.js.map +1 -0
  155. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +416 -0
  156. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -0
  157. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +405 -0
  158. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -0
  159. package/dist/module/config.js +27 -0
  160. package/dist/module/config.js.map +1 -0
  161. package/dist/module/constants.js +16 -0
  162. package/dist/module/constants.js.map +1 -0
  163. package/dist/module/fonts/index.js +2 -0
  164. package/dist/module/fonts/index.js.map +1 -0
  165. package/dist/module/fonts/pluss60-icons.js +5 -0
  166. package/dist/module/fonts/pluss60-icons.js.map +1 -0
  167. package/dist/module/fonts/pluss60-icons.json +1097 -0
  168. package/dist/module/helper.js +436 -0
  169. package/dist/module/helper.js.map +1 -0
  170. package/dist/module/index.js +13 -0
  171. package/dist/module/index.js.map +1 -0
  172. package/dist/module/session.js +54 -0
  173. package/dist/module/session.js.map +1 -0
  174. package/dist/module/styles.js +67 -0
  175. package/dist/module/styles.js.map +1 -0
  176. package/package.json +24 -7
  177. package/src/assets/icons/reactions/heart.png +0 -0
  178. package/src/assets/icons/reactions/party.png +0 -0
  179. package/src/assets/icons/reactions/sad.png +0 -0
  180. package/src/assets/icons/reactions/smile.png +0 -0
  181. package/src/components/CommentReply.js +3 -5
  182. package/src/components/CommentSection.js +4 -4
  183. package/src/components/MediaPlayer.js +14 -4
  184. package/src/components/VideoPopup.js +1 -1
  185. package/src/constants.js +4 -4
  186. package/src/helper.js +4 -4
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["CommentSection.js"],"names":["React","Component","View","Text","TouchableOpacity","Image","StyleSheet","_","moment","connect","Icon","getPluralS","getThumb300","get1400","getSiteSettingFromState","getFirstName","getPluralOptions","getMainBrandingColourFromState","TEXT_DARKEST","BG_GREY","TEXT_LIGHT","LINEGREY","reactionActions","notificationActions","ConfirmPopup","ProfilePic","ImagePopup","InlineButton","Spinner","Services","CommentSection","constructor","props","c","setState","commentToDelete","removeComment","state","Id","then","res","console","log","newComments","filter","comments","commentToReport","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","hideReplyButton","threadComments","innerC","ParentId","content","isEmpty","styles","commentRepliesText","color","colourBrandingMain","User","displayName","profilePics","take","uniqBy","UserId","multiReplyContainer","map","i","marginRight","profilePic","marginLeft","length","commentReplies","onOpenThread","addingComment","componentDidMount","getNotificationSate","includes","user","hidden","getComments","componentWillUnmount","loadTimer","clearTimeout","onPressCommentImage","image","imagePopupSource","imagePopupOpen","onGoToAdd","commentReply","focusInput","getAdjustedSize","size","scaleFont","fontScale","commentsLoadStarted","current","loadingStarted","loadComments","minTime","maxBy","Timestamp","sortBy","concat","onCommentsLoaded","loadingCompleted","live","setTimeout","refreshFrequency","startedAddingComment","commentAdded","push","onCommentAdded","canRemoveComment","uid","permissions","adminPermission","closeCommentGallery","renderCommentDeleteConfirm","onPressConfirmDelete","onPressCancelDelete","renderCommentReportConfirm","onPressConfirmReport","onPressCancelReport","commentReportText","renderCommentReportStatus","isSuccess","onPressConfirmReportStatus","renderCommentImage","commentImageContainer","bind","commentImage","uri","renderComment","commentFlex","commentProfilePic","commentBlock","commentTitleRow","onPressDeleteComment","commentButtonContainer","backgroundColor","commentButtonIcon","commentName","fontSize","Comment","commentText","commentBottom","commentTime","utc","local","format","renderReplyText","renderMute","muteSpinnerContainer","isMuted","hours","getMuteRemaining","mutedFor","muteContainer","mutedForText","onUnmute","onMute","borderColor","muteButton","muteButtonInner","muteButtonIcon","muteButtonText","renderComments","commentSection","isNil","placeHolder","commentsEmpty","source","reverseOrder","reverse","showReplies","commentSectionTitleRow","alignItems","hideAddComment","goToText","commentCount","renderCommentImagePopup","renderReportLoading","reportLoadingContainer","render","commentSectionOuter","style","create","flex","paddingHorizontal","paddingVertical","borderTopColor","borderTopWidth","fontFamily","marginTop","flexDirection","borderRadius","padding","width","height","justifyContent","textAlign","paddingLeft","marginBottom","borderWidth","mapStateToProps","forwardRef"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,gBAArB,EAAuCC,KAAvC,EAA8CC,UAA9C,QAAgE,cAAhE;AACA,OAAOC,CAAP,MAAc,QAAd;AACA,OAAOC,MAAP,MAAmB,QAAnB;AACA,SAASC,OAAT,QAAwB,aAAxB;AACA,SAASC,IAAT,QAAqB,uBAArB;AACA,SAASC,UAAT,EAAqBC,WAArB,EAAkCC,OAAlC,EAA2CC,uBAA3C,EAAoEC,YAApE,EAAkFC,gBAAlF,QAA0G,WAA1G;AACA,SAASC,8BAAT,EAAyCC,YAAzC,EAAuDC,OAAvD,EAAgEC,UAAhE,EAA4EC,QAA5E,QAA4F,YAA5F;AACA,SAASC,eAAT,EAA0BC,mBAA1B,QAAqD,SAArD;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,OAAT,QAAwB,WAAxB;AACA,SAASC,QAAT,QAAyB,WAAzB;;AAEA,MAAMC,cAAN,SAA6B7B,SAA7B,CAAuC;AACrC8B,EAAAA,WAAW,CAACC,KAAD,EAAQ;AACjB,UAAMA,KAAN;;AADiB,k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AR,EAAoC,KAApC;AAH5C,GAAP;AAKD,CAND;;AAQA,MAAM8J,cAAc,GAAG1L,OAAO,CAAC+N,eAAD,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B;AAAEC,EAAAA,UAAU,EAAE;AAAd,CAA5B,CAAP,CAAyD3M,cAAzD,CAAvB;AACA,SAASqK,cAAc,IAAIrK,cAA3B","sourcesContent":["import React, { Component } from 'react';\nimport { View, Text, TouchableOpacity, Image, StyleSheet } from 'react-native';\nimport _ from 'lodash';\nimport moment from 'moment';\nimport { connect } from 'react-redux';\nimport { Icon } from 'react-native-elements';\nimport { getPluralS, getThumb300, get1400, getSiteSettingFromState, getFirstName, getPluralOptions } from '../helper';\nimport { getMainBrandingColourFromState, TEXT_DARKEST, BG_GREY, TEXT_LIGHT, LINEGREY } from '../colours';\nimport { reactionActions, notificationActions } from '../apis';\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 constructor(props) {\n super(props);\n this.state = {\n commentsLoading: false,\n comments: [],\n addingComment: false,\n commentToDelete: null,\n commentToReport: null,\n commentReportedStatus: null,\n reportLoading: false,\n processing: false,\n muteExpiry: null,\n muteLoaded: false,\n };\n }\n\n componentDidMount() {\n this.getNotificationSate();\n\n if (!_.includes(this.props.user.hidden, 'viewComment')) {\n this.getComments();\n }\n }\n\n componentWillUnmount() {\n if (this.loadTimer) {\n clearTimeout(this.loadTimer);\n }\n }\n\n onPressDeleteComment = c => {\n this.setState({ commentToDelete: c });\n };\n\n onPressConfirmDelete = () => {\n reactionActions.removeComment(this.state.commentToDelete.Id).then(res => {\n console.log('deleted');\n });\n const newComments = _.filter(this.state.comments, c => {\n return c.Id !== this.state.commentToDelete.Id;\n });\n this.setState({\n comments: newComments,\n commentToDelete: null,\n });\n };\n\n onPressCancelDelete = () => {\n this.setState({ commentToDelete: null });\n };\n\n onPressReportComment = c => {\n this.setState({ commentToReport: c });\n };\n\n onPressConfirmReport = () => {\n const commentId = this.state.commentToReport.Id;\n this.setState({ reportLoading: true, commentToReport: null }, () => {\n reactionActions\n .reportComment(commentId)\n .then(res => {\n this.setState({ commentReportedStatus: 'success', reportLoading: false });\n })\n .catch(error => {\n console.log('reportComment', error);\n this.setState({ commentReportedStatus: 'fail', reportLoading: false });\n });\n });\n };\n\n onPressCancelReport = () => {\n this.setState({ commentToReport: null });\n };\n\n onPressConfirmReportStatus = () => {\n this.setState({ commentReportedStatus: null });\n };\n\n onPressCommentImage(image) {\n this.setState({\n imagePopupSource: [image],\n imagePopupOpen: true,\n });\n }\n\n onGoToAdd() {\n this.props.commentReply.focusInput();\n }\n\n onOpenThread = comment => {\n Services.navigation.navigate('thread', { ...this.props, threadId: comment.Id });\n };\n\n onMute = () => {\n const { entityType, entityId } = this.props;\n this.setState({ processing: true }, async () => {\n try {\n const { data } = await notificationActions.muteEntity(entityType, entityId);\n // console.log('onMute', data);\n const muteExpiry = moment(data.Expiry);\n this.setState({ muteExpiry, processing: false });\n } catch (error) {\n console.error('onMute', error);\n this.setState({ processing: false });\n }\n });\n };\n\n onUnmute = () => {\n const { entityType, entityId } = this.props;\n this.setState({ processing: true }, async () => {\n try {\n const { data } = await notificationActions.unmuteEntity(entityType, entityId);\n // console.log('onUnmute', data);\n this.setState({ muteExpiry: null, processing: false });\n } catch (error) {\n console.error('onUnmute', error);\n this.setState({ processing: false });\n }\n });\n };\n\n isMuted = () => {\n const { muteExpiry } = this.state;\n return muteExpiry && moment() <= muteExpiry;\n };\n\n getMuteRemaining = () => {\n const { muteExpiry } = this.state;\n const actual = muteExpiry ? moment.duration(muteExpiry.diff(moment())).asHours() : 0;\n return Math.abs(Math.ceil(actual));\n };\n\n getNotificationSate = () => {\n const { processing } = this.state;\n const { entityType, entityId, notificationsForComments } = this.props;\n if (processing || !notificationsForComments) return;\n\n this.setState({ processing: true }, async () => {\n try {\n const { data } = await notificationActions.getEntityNotificationSetting(entityType, entityId);\n // console.log('getNotificationSate', data);\n const muteExpiry = data ? moment(data.Expiry) : null;\n this.setState({ muteExpiry, muteLoaded: true, processing: false });\n } catch (error) {\n console.error('getNotificationSate', error);\n this.setState({ processing: false });\n }\n });\n };\n\n getAdjustedSize(size) {\n if (this.props.scaleFont) {\n return size + this.props.user.fontScale;\n }\n return size;\n }\n\n getComments() {\n if (!this.state.commentsLoadStarted) {\n this.setState({\n commentsLoadStarted: true,\n commentsLoading: true,\n });\n this.props.commentReply?.current?.loadingStarted();\n\n this.loadComments();\n }\n }\n\n isEmpty() {\n return _.isEmpty(this.state.comments);\n }\n\n loadComments() {\n const minTime = this.isEmpty()\n ? 0\n : _.maxBy(this.state.comments, c => {\n return c.Timestamp;\n }).Timestamp;\n reactionActions.getComments(this.props.entityId, this.props.entityType, minTime).then(res => {\n this.setState(\n {\n comments: _.sortBy(\n _.uniqBy(\n _.filter(_.concat(this.state.comments, res.data), c => {\n if (!this.props.threadId) {\n return true;\n }\n return c.Id === this.props.threadId || c.ParentId === this.props.threadId;\n }),\n c => {\n return c.Id;\n },\n ),\n 'Timestamp',\n ),\n commentsLoading: false,\n },\n () => {\n if (this.props.onCommentsLoaded) {\n this.props.onCommentsLoaded(this.state.comments.length);\n }\n },\n );\n //if (this.props.commentReply) {\n this.props.commentReply?.current?.loadingCompleted();\n //}\n if (this.props.live) {\n this.loadTimer = setTimeout(() => {\n this.loadComments();\n }, this.props.refreshFrequency || 2000);\n }\n });\n }\n\n isLoading = () => {\n return this.state.commentsLoading;\n };\n\n startedAddingComment() {\n this.setState({\n addingComment: true,\n });\n }\n\n commentAdded(comment) {\n const newComments = this.state.comments;\n newComments.push(comment);\n this.setState(\n {\n addingComment: false,\n comments: newComments,\n },\n () => {\n if (this.props.onCommentAdded) {\n this.props.onCommentAdded();\n }\n },\n );\n }\n\n canRemoveComment(c) {\n if (this.props.user.uid === c.UserId) {\n return true;\n }\n return _.includes(this.props.user.permissions, this.props.adminPermission);\n }\n\n closeCommentGallery() {\n this.setState({\n imagePopupSource: [],\n imagePopupOpen: false,\n });\n }\n\n renderCommentDeleteConfirm() {\n return (\n <ConfirmPopup\n visible={!!this.state.commentToDelete}\n onConfirm={this.onPressConfirmDelete}\n onCancel={this.onPressCancelDelete}\n onClose={this.onPressCancelDelete}\n text=\"Are you sure you want to delete this comment?\"\n />\n );\n }\n\n renderCommentReportConfirm() {\n return (\n <ConfirmPopup\n visible={!!this.state.commentToReport}\n onConfirm={this.onPressConfirmReport}\n onCancel={this.onPressCancelReport}\n onClose={this.onPressCancelReport}\n text=\"Are you sure?\"\n extraContent={<Text style={styles.commentReportText}>This comment will be reported to our team and considered for deletion</Text>}\n />\n );\n }\n\n renderCommentReportStatus() {\n const { commentReportedStatus } = this.state;\n const isSuccess = commentReportedStatus === 'success';\n return (\n <ConfirmPopup\n visible={!!commentReportedStatus}\n onConfirm={this.onPressConfirmReportStatus}\n text={isSuccess ? 'Thank you for reporting' : 'Unable to report'}\n extraContent={\n <Text style={styles.commentReportText}>\n {isSuccess ? 'We will review the comment within 24 hours' : 'There was a problem reporting the comment please try again later'}\n </Text>\n }\n hideNo\n yesText={'Back to Article'}\n />\n );\n }\n\n renderCommentImage(c) {\n if (_.isEmpty(c.Image)) {\n return null;\n }\n return (\n <TouchableOpacity style={styles.commentImageContainer} onPress={this.onPressCommentImage.bind(this, get1400(c.Image))}>\n <Image style={styles.commentImage} source={{ uri: getThumb300(c.Image) }} />\n </TouchableOpacity>\n );\n }\n\n renderReplyText = c => {\n if (this.props.threadId || this.props.hideReplyButton) {\n return null;\n }\n\n const threadComments = _.filter(this.state.comments, innerC => {\n return innerC.ParentId === c.Id;\n });\n\n let content = null;\n\n if (_.isEmpty(threadComments)) {\n // no replies\n content = (\n <Text style={[styles.commentRepliesText, { color: this.props.colourBrandingMain }]}>{`Reply to ${getFirstName(\n c.User ? c.User.displayName : 'comment',\n )}`}</Text>\n );\n } else {\n // existing replies\n const profilePics = _.take(\n _.uniqBy(threadComments, c => c.UserId),\n 3,\n );\n content = (\n <View style={styles.multiReplyContainer}>\n {profilePics.map((c, i) => {\n return <ProfilePic style={{ marginRight: -10 }} Diameter={20} ProfilePic={c.User.profilePic} />;\n })}\n <Text style={[styles.commentRepliesText, { marginLeft: 20, color: this.props.colourBrandingMain }]}>{`${\n threadComments.length\n } repl${getPluralOptions(threadComments.length, 'y', 'ies')}`}</Text>\n </View>\n );\n }\n\n return (\n <View style={styles.commentReplies}>\n <TouchableOpacity\n onPress={() => {\n this.onOpenThread(c);\n }}\n >\n {content}\n </TouchableOpacity>\n </View>\n );\n };\n\n renderComment(c) {\n return (\n <View style={styles.comment} key={c.Id}>\n <View style={styles.commentFlex}>\n <ProfilePic ProfilePic={c.User.profilePic} Diameter={40} style={styles.commentProfilePic} />\n <View style={styles.commentBlock}>\n <View style={styles.commentTitleRow}>\n {this.canRemoveComment(c) ? (\n <TouchableOpacity onPress={this.onPressDeleteComment.bind(this, c)}>\n <View style={[styles.commentButtonContainer, { backgroundColor: this.props.colourBrandingMain }]}>\n <Icon name=\"trash\" type=\"font-awesome\" iconStyle={styles.commentButtonIcon} />\n </View>\n </TouchableOpacity>\n ) : null\n // (\n // !this.props.disableFlag && (\n // <TouchableOpacity onPress={this.onPressReportComment.bind(this, c)}>\n // <View style={[styles.commentButtonContainer, { backgroundColor: this.props.colourBrandingMain }]}>\n // <Icon name=\"flag\" type=\"font-awesome\" iconStyle={styles.commentButtonIcon} />\n // </View>\n // </TouchableOpacity>\n // )\n // )\n }\n <Text style={[styles.commentName, { fontSize: this.getAdjustedSize(13) }]}>{c.User.displayName}</Text>\n </View>\n {!_.isEmpty(c.Comment) && <Text style={[styles.commentText, { fontSize: this.getAdjustedSize(13) }]}>{c.Comment}</Text>}\n {this.renderCommentImage(c)}\n </View>\n </View>\n <View style={styles.commentBottom}>\n <Text style={[styles.commentTime, { fontSize: this.getAdjustedSize(13) }]}>\n {moment\n .utc(c.Timestamp)\n .local()\n .format('D MMM • h:mma')}\n </Text>\n {this.renderReplyText(c)}\n </View>\n </View>\n );\n }\n\n renderMute() {\n const { notificationsForComments } = this.props;\n const { muteLoaded, muteExpiry, processing } = this.state;\n if (!notificationsForComments || !muteLoaded) return null;\n\n if (processing)\n return (\n <View style={styles.muteSpinnerContainer}>\n <Spinner size={'small'} color={this.props.colourBrandingMain} />\n </View>\n );\n\n const isMuted = this.isMuted();\n const hours = this.getMuteRemaining();\n const mutedFor = `Muted for ${hours} hour${getPluralS(hours)}`;\n // console.log(muteExpiry.format('DD MMM YYYY hh:mm a'));\n\n return (\n <View style={styles.muteContainer}>\n {isMuted && muteExpiry ? <Text style={[{ color: this.props.colourBrandingMain }, styles.mutedForText]}>{mutedFor}</Text> : null}\n <InlineButton\n onPress={isMuted ? this.onUnmute : this.onMute}\n color=\"#fff\"\n style={[{ borderColor: this.props.colourBrandingMain }, styles.muteButton]}\n disabled={processing}\n disabledOpacity\n noText\n >\n <View style={styles.muteButtonInner}>\n <Icon\n name={isMuted ? 'bell-o' : 'bell-slash-o'}\n type={'font-awesome'}\n iconStyle={[{ color: this.props.colourBrandingMain }, styles.muteButtonIcon]}\n />\n <Text style={[{ color: this.props.colourBrandingMain }, styles.muteButtonText]}>{isMuted ? 'Unmute' : 'Mute'}</Text>\n </View>\n </InlineButton>\n </View>\n );\n }\n\n renderComments() {\n if (this.state.commentsLoading) {\n return (\n <View style={styles.commentSection}>\n <Spinner color={this.props.colourBrandingMain} />\n </View>\n );\n }\n if (this.isEmpty() && !this.state.addingComment) {\n if (_.includes(this.props.user.hidden, 'addComment')) {\n return null;\n }\n if (!_.isNil(this.props.placeHolder) && _.isEmpty(this.props.placeHolder)) return null;\n return (\n <View style={styles.commentSection}>\n <Text style={[styles.commentsEmpty, { fontSize: this.getAdjustedSize(15) }]}>\n {_.isNil(this.props.placeHolder) ? 'Be the first to add a comment!' : this.props.placeHolder}\n </Text>\n </View>\n );\n }\n let source = [...this.state.comments];\n if (this.props.reverseOrder) {\n source = source.reverse();\n }\n if (!this.props.showReplies && !this.props.threadId) {\n source = _.filter(source, c => {\n return !c.ParentId;\n });\n }\n return (\n <View style={styles.commentSection}>\n {!this.isEmpty() && (\n <View style={styles.commentSectionTitleRow}>\n <View style={{ alignItems: 'flex-end' }}>\n {this.renderMute()}\n {!this.props.hideAddComment && this.state.comments.length > 2 && (\n <TouchableOpacity onPress={this.onGoToAdd.bind(this)}>\n <Text style={[styles.goToText, { color: this.props.colourBrandingMain }]}>Add a comment</Text>\n </TouchableOpacity>\n )}\n </View>\n <Text style={[styles.commentCount, { fontSize: this.getAdjustedSize(15) }]}>\n {this.state.comments.length}\n {` comment${getPluralS(this.state.comments.length)}`}\n </Text>\n </View>\n )}\n {this.props.reverseOrder && this.state.addingComment && <Spinner color={this.props.colourBrandingMain} />}\n {source.map(c => {\n return this.renderComment(c);\n })}\n {!this.props.reverseOrder && this.state.addingComment && <Spinner color={this.props.colourBrandingMain} />}\n </View>\n );\n }\n\n renderCommentImagePopup() {\n return (\n <ImagePopup\n visible={this.state.imagePopupOpen}\n images={this.state.imagePopupSource}\n onClose={this.closeCommentGallery.bind(this)}\n ref=\"commentImagePopup\"\n />\n );\n }\n\n renderReportLoading() {\n if (!this.state.reportLoading) return null;\n return (\n <View style={styles.reportLoadingContainer}>\n <Spinner color={this.props.colourBrandingMain} />\n </View>\n );\n }\n\n render() {\n if (_.includes(this.props.user.hidden, 'viewComment')) {\n return null;\n }\n return (\n <View style={[styles.commentSectionOuter, this.props.style]}>\n {this.renderComments()}\n {this.renderReportLoading()}\n {this.renderCommentDeleteConfirm()}\n {this.renderCommentReportConfirm()}\n {this.renderCommentReportStatus()}\n {this.renderCommentImagePopup()}\n </View>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n commentSectionOuter: {\n flex: 1,\n paddingHorizontal: 16,\n },\n commentSection: {\n flex: 1,\n paddingVertical: 12,\n borderTopColor: LINEGREY,\n borderTopWidth: 1,\n },\n commentCount: {\n fontFamily: 'sf-semibold',\n color: TEXT_DARKEST,\n flex: 1,\n marginTop: 4,\n },\n comment: {\n marginTop: 16,\n },\n commentFlex: {\n flexDirection: 'row',\n },\n commentProfilePic: {\n marginRight: 8,\n },\n commentBlock: {\n flex: 1,\n backgroundColor: BG_GREY,\n borderRadius: 5,\n padding: 8,\n },\n commentTitleRow: {\n flexDirection: 'row-reverse',\n alignItems: 'center',\n },\n commentButtonContainer: {\n width: 24,\n height: 24,\n borderRadius: 12,\n alignItems: 'center',\n justifyContent: 'center',\n },\n commentButtonIcon: {\n fontSize: 13,\n color: '#fff',\n },\n commentName: {\n fontFamily: 'sf-semibold',\n color: TEXT_DARKEST,\n flex: 1,\n },\n commentText: {\n marginTop: 8,\n fontFamily: 'sf-regular',\n color: TEXT_DARKEST,\n },\n commentBottom: {\n flexDirection: 'row-reverse',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n commentTime: {\n fontFamily: 'sf-regular',\n marginTop: 4,\n color: TEXT_LIGHT,\n textAlign: 'right',\n },\n commentReplies: {\n flex: 1,\n paddingLeft: 48,\n },\n commentRepliesText: {\n fontFamily: 'sf-semibold',\n fontSize: 15,\n },\n multiReplyContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n paddingVertical: 4,\n },\n commentImageContainer: {\n marginTop: 8,\n width: 60,\n height: 60,\n },\n commentImage: {\n width: 60,\n height: 60,\n borderRadius: 2,\n },\n commentsEmpty: {\n fontFamily: 'sf-semibold',\n color: TEXT_DARKEST,\n },\n commentSectionTitleRow: {\n flexDirection: 'row-reverse',\n },\n commentReportText: {\n fontFamily: 'sf-regular',\n fontSize: 14,\n paddingHorizontal: 22,\n textAlign: 'center',\n },\n reportLoadingContainer: {\n paddingVertical: 10,\n },\n goToText: {\n marginTop: 4,\n },\n muteSpinnerContainer: {\n width: 100,\n marginBottom: 6,\n },\n muteContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'flex-end',\n marginBottom: 6,\n },\n mutedForText: {\n fontFamily: 'sf-semibold',\n fontSize: 13,\n marginRight: 8,\n },\n muteButton: {\n borderWidth: 1,\n paddingHorizontal: 8,\n },\n muteButtonInner: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n muteButtonIcon: {\n fontSize: 14,\n },\n muteButtonText: {\n fontFamily: 'sf-semibold',\n fontSize: 14,\n marginLeft: 6,\n },\n});\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: getMainBrandingColourFromState(state),\n user: state.user,\n notificationsForComments: getSiteSettingFromState(state, 'NotificationsForComments', false),\n };\n};\n\nconst commentSection = connect(mapStateToProps, {}, null, { forwardRef: true })(CommentSection);\nexport { commentSection as CommentSection };\n"]}
@@ -0,0 +1,85 @@
1
+ import React, { PureComponent } from 'react';
2
+ import { Text, View } from 'react-native';
3
+ import { connect } from 'react-redux';
4
+ import { getMainBrandingColourFromState, TEXT_DARK } from '../colours';
5
+ import { Spinner } from './Spinner';
6
+ import { InlineButton } from './InlineButton';
7
+ import { MiddlePopup } from './MiddlePopup';
8
+
9
+ class ConfirmPopup extends PureComponent {
10
+ render() {
11
+ return /*#__PURE__*/React.createElement(MiddlePopup, {
12
+ visible: this.props.visible,
13
+ onClose: this.props.onClose,
14
+ style: [styles.popup, this.props.headerContent && {
15
+ paddingTop: 16
16
+ }]
17
+ }, this.props.headerContent && /*#__PURE__*/React.createElement(View, {
18
+ style: {
19
+ width: 350,
20
+ marginBottom: 16
21
+ }
22
+ }, this.props.headerContent), /*#__PURE__*/React.createElement(Text, {
23
+ style: styles.text
24
+ }, this.props.text), this.props.extraContent && /*#__PURE__*/React.createElement(View, {
25
+ style: {
26
+ width: 350,
27
+ marginTop: 16
28
+ }
29
+ }, this.props.extraContent), /*#__PURE__*/React.createElement(View, {
30
+ style: styles.buttonsContainer
31
+ }, this.props.buttonsLoading && /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Spinner, null)), !this.props.hideNo && !this.props.buttonsLoading && /*#__PURE__*/React.createElement(InlineButton, {
32
+ onPress: this.props.onCancel,
33
+ color: "#fff",
34
+ style: [styles.button, styles.noButton, {
35
+ borderColor: this.props.colourBrandingMain
36
+ }],
37
+ textStyle: {
38
+ color: this.props.colourBrandingMain
39
+ },
40
+ large: true
41
+ }, this.props.noText || 'No'), !this.props.buttonsLoading && /*#__PURE__*/React.createElement(InlineButton, {
42
+ onPress: this.props.onConfirm,
43
+ color: this.props.colourBrandingMain,
44
+ style: styles.button,
45
+ large: true
46
+ }, this.props.yesText || 'Yes')));
47
+ }
48
+
49
+ }
50
+
51
+ const styles = {
52
+ popup: {
53
+ padding: 32,
54
+ margin: 16,
55
+ maxWidth: 350
56
+ },
57
+ text: {
58
+ fontFamily: 'sf-bold',
59
+ fontSize: 20,
60
+ color: TEXT_DARK,
61
+ textAlign: 'center'
62
+ },
63
+ buttonsContainer: {
64
+ flexDirection: 'row',
65
+ marginTop: 24
66
+ },
67
+ button: {
68
+ width: 120,
69
+ paddingHorizontal: 2
70
+ },
71
+ noButton: {
72
+ borderWidth: 1,
73
+ marginRight: 16
74
+ }
75
+ };
76
+
77
+ const mapStateToProps = state => {
78
+ return {
79
+ colourBrandingMain: getMainBrandingColourFromState(state)
80
+ };
81
+ };
82
+
83
+ const confirmPopup = connect(mapStateToProps, {})(ConfirmPopup);
84
+ export { confirmPopup as ConfirmPopup };
85
+ //# sourceMappingURL=ConfirmPopup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ConfirmPopup.js"],"names":["React","PureComponent","Text","View","connect","getMainBrandingColourFromState","TEXT_DARK","Spinner","InlineButton","MiddlePopup","ConfirmPopup","render","props","visible","onClose","styles","popup","headerContent","paddingTop","width","marginBottom","text","extraContent","marginTop","buttonsContainer","buttonsLoading","hideNo","onCancel","button","noButton","borderColor","colourBrandingMain","color","noText","onConfirm","yesText","padding","margin","maxWidth","fontFamily","fontSize","textAlign","flexDirection","paddingHorizontal","borderWidth","marginRight","mapStateToProps","state","confirmPopup"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,a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,MAAM,EAAE;AACNT,IAAAA,KAAK,EAAE,GADD;AAENwB,IAAAA,iBAAiB,EAAE;AAFb,GAhBK;AAoBbd,EAAAA,QAAQ,EAAE;AACRe,IAAAA,WAAW,EAAE,CADL;AAERC,IAAAA,WAAW,EAAE;AAFL;AApBG,CAAf;;AA0BA,MAAMC,eAAe,GAAGC,KAAK,IAAI;AAC/B,SAAO;AACLhB,IAAAA,kBAAkB,EAAE1B,8BAA8B,CAAC0C,KAAD;AAD7C,GAAP;AAGD,CAJD;;AAMA,MAAMC,YAAY,GAAG5C,OAAO,CAAC0C,eAAD,EAAkB,EAAlB,CAAP,CAA6BpC,YAA7B,CAArB;AACA,SAASsC,YAAY,IAAItC,YAAzB","sourcesContent":["import React, { PureComponent } from 'react';\nimport { Text, View } from 'react-native';\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 render() {\n return (\n <MiddlePopup\n visible={this.props.visible}\n onClose={this.props.onClose}\n style={[styles.popup, this.props.headerContent && { paddingTop: 16 }]}\n >\n {this.props.headerContent && <View style={{ width: 350, marginBottom: 16 }}>{this.props.headerContent}</View>}\n <Text style={styles.text}>{this.props.text}</Text>\n {this.props.extraContent && <View style={{ width: 350, marginTop: 16 }}>{this.props.extraContent}</View>}\n <View style={styles.buttonsContainer}>\n {this.props.buttonsLoading && (\n <View>\n <Spinner />\n </View>\n )}\n {!this.props.hideNo && !this.props.buttonsLoading && (\n <InlineButton\n onPress={this.props.onCancel}\n color=\"#fff\"\n style={[styles.button, styles.noButton, { borderColor: this.props.colourBrandingMain }]}\n textStyle={{ color: this.props.colourBrandingMain }}\n large\n >\n {this.props.noText || 'No'}\n </InlineButton>\n )}\n {!this.props.buttonsLoading && (\n <InlineButton onPress={this.props.onConfirm} color={this.props.colourBrandingMain} style={styles.button} large>\n {this.props.yesText || 'Yes'}\n </InlineButton>\n )}\n </View>\n </MiddlePopup>\n );\n }\n}\n\nconst styles = {\n popup: {\n padding: 32,\n margin: 16,\n maxWidth: 350,\n },\n text: {\n fontFamily: 'sf-bold',\n fontSize: 20,\n color: TEXT_DARK,\n textAlign: 'center',\n },\n buttonsContainer: {\n flexDirection: 'row',\n marginTop: 24,\n },\n button: {\n width: 120,\n paddingHorizontal: 2,\n },\n noButton: {\n borderWidth: 1,\n marginRight: 16,\n },\n};\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: getMainBrandingColourFromState(state),\n };\n};\n\nconst confirmPopup = connect(mapStateToProps, {})(ConfirmPopup);\nexport { confirmPopup as ConfirmPopup };\n"]}
@@ -0,0 +1,77 @@
1
+ import React, { PureComponent } from 'react';
2
+ import { Text } from 'react-native';
3
+ import { connect } from 'react-redux';
4
+ import { Pl60Icon } from '../fonts';
5
+ import { COLOUR_GREEN, TEXT_DARK, getMainBrandingColourFromState } from '../colours';
6
+ import { MiddlePopup } from './MiddlePopup';
7
+ import { InlineButton } from './InlineButton';
8
+
9
+ class ConfirmationPopup extends PureComponent {
10
+ render() {
11
+ return /*#__PURE__*/React.createElement(MiddlePopup, {
12
+ visible: this.props.visible,
13
+ onClose: this.props.onClose,
14
+ style: [styles.popup, this.props.style]
15
+ }, /*#__PURE__*/React.createElement(Pl60Icon, {
16
+ style: styles.icon,
17
+ name: "circleoutlined"
18
+ }), /*#__PURE__*/React.createElement(Text, {
19
+ style: styles.text
20
+ }, this.props.confirmText), this.props.onPressAction && /*#__PURE__*/React.createElement(InlineButton, {
21
+ onPress: this.props.onPressAction,
22
+ color: this.props.colourBrandingMain,
23
+ style: [styles.button, this.props.largeButtons && styles.largeButton],
24
+ large: this.props.largeButtons
25
+ }, this.props.repeatText), /*#__PURE__*/React.createElement(InlineButton, {
26
+ onPress: this.props.onClose,
27
+ color: "#fff",
28
+ style: [styles.button, styles.closeButton, this.props.largeButtons && styles.largeButton, {
29
+ borderColor: this.props.colourBrandingMain
30
+ }],
31
+ textStyle: {
32
+ color: this.props.colourBrandingMain
33
+ },
34
+ large: this.props.largeButtons
35
+ }, "Close"));
36
+ }
37
+
38
+ }
39
+
40
+ const styles = {
41
+ popup: {
42
+ width: 280,
43
+ paddingVertical: 40
44
+ },
45
+ icon: {
46
+ fontSize: 52,
47
+ color: COLOUR_GREEN
48
+ },
49
+ text: {
50
+ fontFamily: 'sf-bold',
51
+ fontSize: 24,
52
+ lineHeight: 24,
53
+ color: TEXT_DARK,
54
+ textAlign: 'center',
55
+ marginTop: 8
56
+ },
57
+ button: {
58
+ width: 150,
59
+ marginTop: 20
60
+ },
61
+ closeButton: {
62
+ borderWidth: 1
63
+ },
64
+ largeButton: {
65
+ width: 250
66
+ }
67
+ };
68
+
69
+ const mapStateToProps = state => {
70
+ return {
71
+ colourBrandingMain: getMainBrandingColourFromState(state)
72
+ };
73
+ };
74
+
75
+ const confirmationPopup = connect(mapStateToProps, {})(ConfirmationPopup);
76
+ export { confirmationPopup as ConfirmationPopup };
77
+ //# sourceMappingURL=ConfirmationPopup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ConfirmationPopup.js"],"names":["React","PureComponent","Text","connect","Pl60Icon","COLOUR_GREEN","TEXT_DARK","getMainBrandingColourFromState","MiddlePopup","InlineButton","ConfirmationPopup","render","props","visible","onClose","styles","popup","style","icon","text","confirmText","onPressAction","colourBrandingMain","button","largeButtons","largeButton","repeatText","closeButton","borderColor","color","width","paddingVertical","fontSize","fontFamily","lineHeight","textAlign","marginTop","borderWidth","mapStateToProps","state","confirmationPopup"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,aAAhB,QAAqC,OAArC;AACA,SAASC,IAAT,QAAqB,cAArB;AACA,SAASC,OAAT,QAAwB,aAAxB;AACA,SAASC,QAAT,QAAyB,UAAzB;AACA,SAASC,YAAT,EAAuBC,SAAvB,EAAkCC,8BAAlC,QAAwE,YAAxE;AACA,SAASC,WAAT,QAA4B,eAA5B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AA,KAAK,EAAE,KAAKjB,KAAL,CAAWU;AAApB,OATb;AAUE,MAAA,KAAK,EAAE,KAAKV,KAAL,CAAWY;AAVpB,eAbF,CADF;AA8BD;;AAhC2C;;AAmC9C,MAAMT,MAAM,GAAG;AACbC,EAAAA,KAAK,EAAE;AACLc,IAAAA,KAAK,EAAE,GADF;AAELC,IAAAA,eAAe,EAAE;AAFZ,GADM;AAKbb,EAAAA,IAAI,EAAE;AACJc,IAAAA,QAAQ,EAAE,EADN;AAEJH,IAAAA,KAAK,EAAExB;AAFH,GALO;AASbc,EAAAA,IAAI,EAAE;AACJc,IAAAA,UAAU,EAAE,SADR;AAEJD,IAAAA,QAAQ,EAAE,EAFN;AAGJE,IAAAA,UAAU,EAAE,EAHR;AAIJL,IAAAA,KAAK,EAAEvB,SAJH;AAKJ6B,IAAAA,SAAS,EAAE,QALP;AAMJC,IAAAA,SAAS,EAAE;AANP,GATO;AAiBbb,EAAAA,MAAM,EAAE;AACNO,IAAAA,KAAK,EAAE,GADD;AAENM,IAAAA,SAAS,EAAE;AAFL,GAjBK;AAqBbT,EAAAA,WAAW,EAAE;AACXU,IAAAA,WAAW,EAAE;AADF,GArBA;AAwBbZ,EAAAA,WAAW,EAAE;AACXK,IAAAA,KAAK,EAAE;AADI;AAxBA,CAAf;;AA6BA,MAAMQ,eAAe,GAAGC,KAAK,IAAI;AAC/B,SAAO;AACLjB,IAAAA,kBAAkB,EAAEf,8BAA8B,CAACgC,KAAD;AAD7C,GAAP;AAGD,CAJD;;AAMA,MAAMC,iBAAiB,GAAGrC,OAAO,CAACmC,eAAD,EAAkB,EAAlB,CAAP,CAA6B5B,iBAA7B,CAA1B;AACA,SAAS8B,iBAAiB,IAAI9B,iBAA9B","sourcesContent":["import React, { PureComponent } from 'react';\nimport { Text } from 'react-native';\nimport { connect } from 'react-redux';\nimport { Pl60Icon } from '../fonts';\nimport { COLOUR_GREEN, TEXT_DARK, getMainBrandingColourFromState } from '../colours';\nimport { MiddlePopup } from './MiddlePopup';\nimport { InlineButton } from './InlineButton';\n\nclass ConfirmationPopup extends PureComponent {\n render() {\n return (\n <MiddlePopup visible={this.props.visible} onClose={this.props.onClose} style={[styles.popup, this.props.style]}>\n <Pl60Icon style={styles.icon} name=\"circleoutlined\" />\n <Text style={styles.text}>{this.props.confirmText}</Text>\n {this.props.onPressAction && (\n <InlineButton\n onPress={this.props.onPressAction}\n color={this.props.colourBrandingMain}\n style={[styles.button, this.props.largeButtons && styles.largeButton]}\n large={this.props.largeButtons}\n >\n {this.props.repeatText}\n </InlineButton>\n )}\n <InlineButton\n onPress={this.props.onClose}\n color=\"#fff\"\n style={[\n styles.button,\n styles.closeButton,\n this.props.largeButtons && styles.largeButton,\n { borderColor: this.props.colourBrandingMain },\n ]}\n textStyle={{ color: this.props.colourBrandingMain }}\n large={this.props.largeButtons}\n >\n Close\n </InlineButton>\n </MiddlePopup>\n );\n }\n}\n\nconst styles = {\n popup: {\n width: 280,\n paddingVertical: 40,\n },\n icon: {\n fontSize: 52,\n color: COLOUR_GREEN,\n },\n text: {\n fontFamily: 'sf-bold',\n fontSize: 24,\n lineHeight: 24,\n color: TEXT_DARK,\n textAlign: 'center',\n marginTop: 8,\n },\n button: {\n width: 150,\n marginTop: 20,\n },\n closeButton: {\n borderWidth: 1,\n },\n largeButton: {\n width: 250,\n },\n};\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: getMainBrandingColourFromState(state),\n };\n};\n\nconst confirmationPopup = connect(mapStateToProps, {})(ConfirmationPopup);\nexport { confirmationPopup as ConfirmationPopup };\n"]}
@@ -0,0 +1,82 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ import React, { Component } from 'react';
4
+ import _ from 'lodash';
5
+ import { Text, TouchableOpacity } from 'react-native';
6
+ import { Icon } from 'react-native-elements';
7
+ import { connect } from 'react-redux';
8
+ import { TEXT_DARK, getMainBrandingColourFromState } from '../colours';
9
+
10
+ class DropDownItem extends Component {
11
+ constructor() {
12
+ super(...arguments);
13
+
14
+ _defineProperty(this, "state", {});
15
+ }
16
+
17
+ renderIcon() {
18
+ if (!_.isUndefined(this.props.icon)) {
19
+ return /*#__PURE__*/React.createElement(Icon, {
20
+ name: this.props.icon,
21
+ type: "font-awesome",
22
+ style: styles.dropDownItem_Icon,
23
+ iconStyle: [styles.dropDownItem_IconStyle, {
24
+ fontSize: 16,
25
+ color: this.props.colourBrandingMain
26
+ }]
27
+ });
28
+ }
29
+
30
+ return null;
31
+ }
32
+
33
+ render() {
34
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
35
+ style: [styles.container, this.props.last && {
36
+ marginBottom: 0
37
+ }, this.props.style],
38
+ onPress: this.props.onPress,
39
+ activeOpacity: 0.6
40
+ }, this.renderIcon(), /*#__PURE__*/React.createElement(Text, {
41
+ style: [styles.text, this.props.textStyle]
42
+ }, this.props.text));
43
+ }
44
+
45
+ }
46
+
47
+ const styles = {
48
+ container: {
49
+ flexDirection: 'row',
50
+ marginBottom: 12,
51
+ minHeight: 18,
52
+ width: '100%',
53
+ position: 'relative'
54
+ },
55
+ text: {
56
+ fontFamily: 'sf-medium',
57
+ fontSize: 16,
58
+ lineHeight: 18,
59
+ color: TEXT_DARK,
60
+ backgroundColor: 'transparent'
61
+ },
62
+ dropDownItem_Icon: {
63
+ marginRight: 8,
64
+ width: 18,
65
+ alignSelf: 'center'
66
+ },
67
+ dropDownItem_IconStyle: {
68
+ fontSize: 16,
69
+ lineHeight: 18,
70
+ textAlign: 'center'
71
+ }
72
+ };
73
+
74
+ const mapStateToProps = state => {
75
+ return {
76
+ colourBrandingMain: getMainBrandingColourFromState(state)
77
+ };
78
+ };
79
+
80
+ const dropDownItem = connect(mapStateToProps, {})(DropDownItem);
81
+ export { dropDownItem as DropDownItem };
82
+ //# sourceMappingURL=DropDownItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["DropDownItem.js"],"names":["React","Component","_","Text","TouchableOpacity","Icon","connect","TEXT_DARK","getMainBrandingColourFromState","DropDownItem","renderIcon","isUndefined","props","icon","styles","dropDownItem_Icon","dropDownItem_IconStyle","fontSize","color","colourBrandingMain","render","container","last","marginBottom","style","onPress","text","textStyle","flexDirection","minHeight","width","position","fontFamily","lineHeight","backgroundColor","marginRight","alignSelf","textAlign","mapStateToProps","state","dropDownItem"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,OAAOC,CAAP,MAAc,QAAd;AACA,SAASC,IAAT,EAAeC,gBAAf,QAAuC,cAAvC;AACA,SAASC,IAAT,QAAqB,uBAArB;AACA,SAASC,OAAT,QAAwB,aAAxB;AACA,SAASC,SAAT,EAAoBC,8BAApB,QAA0D,YAA1D;;AAEA,MAAMC,YAAN,SAA2BR,SAA3B,CAAqC;AAAA;AAAA;;AAAA,mCAC3B,EAD2B;AAAA;;AAGnCS,EAAAA,UAAU,GAAG;AACX,QAAI,CAACR,CAAC,CAACS,WAAF,CAAc,KAAKC,KAAL,CAAWC,IAAzB,CAAL,EAAqC;AACnC,0BACE,oBAAC,IAAD;AACE,QAAA,IAAI,EAAE,KAAKD,KAAL,CAAWC,IADnB;AAEE,QAAA,IAAI,EAAC,cAFP;AAGE,QAAA,KAAK,EAAEC,MAAM,CAACC,iBAHhB;AAIE,QAAA,SAAS,EAAE,CAACD,MAAM,CAACE,sBAAR,EAAgC;AAAEC,UAAAA,QAAQ,EAAE,EAAZ;AAAgBC,UAAAA,KAAK,EAAE,KAAKN,KAAL,CAAWO;AAAlC,SAAhC;AAJb,QADF;AAQD;;AACD,WAAO,IAAP;AACD;;AAEDC,EAAAA,MAAM,GAAG;AACP,wBACE,oBAAC,gBAAD;AACE,MAAA,KAAK,EAAE,CAACN,MAAM,CAACO,SAAR,EAAmB,KAAKT,KAAL,CAAWU,IAAX,IAAmB;AAAEC,QAAAA,YAAY,EAAE;AAAhB,OAAtC,EAA2D,K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+B,YAAY,IAAI/B,YAAzB","sourcesContent":["import React, { Component } from 'react';\nimport _ from 'lodash';\nimport { Text, TouchableOpacity } from 'react-native';\nimport { Icon } from 'react-native-elements';\nimport { connect } from 'react-redux';\nimport { TEXT_DARK, getMainBrandingColourFromState } from '../colours';\n\nclass DropDownItem extends Component {\n state = {};\n\n renderIcon() {\n if (!_.isUndefined(this.props.icon)) {\n return (\n <Icon\n name={this.props.icon}\n type=\"font-awesome\"\n style={styles.dropDownItem_Icon}\n iconStyle={[styles.dropDownItem_IconStyle, { fontSize: 16, color: this.props.colourBrandingMain }]}\n />\n );\n }\n return null;\n }\n\n render() {\n return (\n <TouchableOpacity\n style={[styles.container, this.props.last && { marginBottom: 0 }, this.props.style]}\n onPress={this.props.onPress}\n activeOpacity={0.6}\n >\n {this.renderIcon()}\n <Text style={[styles.text, this.props.textStyle]}>{this.props.text}</Text>\n </TouchableOpacity>\n );\n }\n}\n\nconst styles = {\n container: {\n flexDirection: 'row',\n marginBottom: 12,\n minHeight: 18,\n width: '100%',\n position: 'relative',\n },\n text: {\n fontFamily: 'sf-medium',\n fontSize: 16,\n lineHeight: 18,\n color: TEXT_DARK,\n backgroundColor: 'transparent',\n },\n dropDownItem_Icon: {\n marginRight: 8,\n width: 18,\n alignSelf: 'center',\n },\n dropDownItem_IconStyle: {\n fontSize: 16,\n lineHeight: 18,\n textAlign: 'center',\n },\n};\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: getMainBrandingColourFromState(state),\n };\n};\n\nconst dropDownItem = connect(mapStateToProps, {})(DropDownItem);\nexport { dropDownItem as DropDownItem };\n"]}
@@ -0,0 +1,46 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ import React, { Component } from 'react';
4
+ import { View } from 'react-native';
5
+
6
+ class DropDownMenu extends Component {
7
+ constructor() {
8
+ super(...arguments);
9
+
10
+ _defineProperty(this, "state", {});
11
+ }
12
+
13
+ render() {
14
+ if (!this.props.visible) {
15
+ return null;
16
+ }
17
+
18
+ return /*#__PURE__*/React.createElement(View, {
19
+ style: [styles.container, this.props.style]
20
+ }, this.props.children);
21
+ }
22
+
23
+ }
24
+
25
+ const styles = {
26
+ container: {
27
+ borderRadius: 2,
28
+ shadowColor: '#000',
29
+ shadowOffset: {
30
+ width: 0,
31
+ height: 2
32
+ },
33
+ shadowOpacity: 0.2,
34
+ shadowRadius: 4,
35
+ elevation: 4,
36
+ zIndex: 10,
37
+ backgroundColor: '#fff',
38
+ padding: 16,
39
+ paddingVertical: 14,
40
+ position: 'absolute',
41
+ right: 0,
42
+ top: 0
43
+ }
44
+ };
45
+ export { DropDownMenu };
46
+ //# sourceMappingURL=DropDownMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["DropDownMenu.js"],"names":["React","Component","View","DropDownMenu","render","props","visible","styles","container","style","children","borderRadius","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","zIndex","backgroundColor","padding","paddingVertical","position","right","top"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,IAAT,QAAqB,cAArB;;AAEA,MAAMC,YAAN,SAA2BF,SAA3B,CAAqC;AAAA;AAAA;;AAAA,mCAC3B,EAD2B;AAAA;;AAGnCG,EAAAA,MAAM,GAAG;AACP,QAAI,CAAC,KAAKC,KAAL,CAAWC,OAAhB,EAAyB;AACvB,aAAO,IAAP;AACD;;AACD,wBAAO,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmB,KAAKH,KAAL,CAAWI,KAA9B;AAAb,OAAoD,KAAKJ,KAAL,CAAWK,QAA/D,CAAP;AACD;;AARkC;;AAWrC,MAAMH,MAAM,GAAG;AACbC,EAAAA,SAAS,EAAE;AACTG,IAAAA,YAAY,EAAE,CADL;AAETC,IAAAA,WAAW,EAAE,MAFJ;AAGTC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,CADK;AAEZC,MAAAA,MAAM,EAAE;AAFI,KAHL;AAOTC,IAAAA,aAAa,EAAE,GAPN;AAQTC,IAAAA,YAAY,EAAE,CARL;AASTC,IAAAA,SAAS,EAAE,CATF;AAUTC,IAAAA,MAAM,EAAE,EAVC;AAWTC,IAAAA,eAAe,EAAE,MAXR;AAYTC,IAAAA,OAAO,EAAE,EAZA;AAaTC,IAAAA,eAAe,EAAE,EAbR;AAeTC,IAAAA,QAAQ,EAAE,UAfD;AAgBTC,IAAAA,KAAK,EAAE,CAhBE;AAiBTC,IAAAA,GAAG,EAAE;AAjBI;AADE,CAAf;AAsBA,SAAStB,YAAT","sourcesContent":["import React, { Component } from 'react';\nimport { View } from 'react-native';\n\nclass DropDownMenu extends Component {\n state = {};\n\n render() {\n if (!this.props.visible) {\n return null;\n }\n return <View style={[styles.container, this.props.style]}>{this.props.children}</View>;\n }\n}\n\nconst styles = {\n container: {\n borderRadius: 2,\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.2,\n shadowRadius: 4,\n elevation: 4,\n zIndex: 10,\n backgroundColor: '#fff',\n padding: 16,\n paddingVertical: 14,\n\n position: 'absolute',\n right: 0,\n top: 0,\n },\n};\n\nexport { DropDownMenu };\n"]}
@@ -0,0 +1,50 @@
1
+ import React, { PureComponent } from 'react';
2
+ import { Text, View, ScrollView, StyleSheet } from 'react-native';
3
+ import { TEXT_BLUEGREY } from '../colours';
4
+
5
+ class EmptyStateMain extends PureComponent {
6
+ renderPlaceHolder() {
7
+ let opacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
8
+ return /*#__PURE__*/React.createElement(View, {
9
+ style: [styles.item, {
10
+ opacity
11
+ }]
12
+ });
13
+ }
14
+
15
+ render() {
16
+ return /*#__PURE__*/React.createElement(View, {
17
+ style: [styles.container, this.props.style]
18
+ }, /*#__PURE__*/React.createElement(Text, {
19
+ style: styles.titleText
20
+ }, this.props.title || 'Nothing to see here'), /*#__PURE__*/React.createElement(ScrollView, {
21
+ style: styles.itemContainer
22
+ }, this.renderPlaceHolder(0.8), this.renderPlaceHolder(0.6), this.renderPlaceHolder(0.4)));
23
+ }
24
+
25
+ }
26
+
27
+ const styles = StyleSheet.create({
28
+ container: {
29
+ borderRadius: 5,
30
+ paddingVertical: 5
31
+ },
32
+ titleText: {
33
+ fontFamily: 'qs-bold',
34
+ fontSize: 16,
35
+ color: TEXT_BLUEGREY
36
+ },
37
+ itemContainer: {
38
+ marginTop: 20,
39
+ flexDirection: 'column'
40
+ },
41
+ item: {
42
+ borderRadius: 4,
43
+ width: '100%',
44
+ height: 32,
45
+ backgroundColor: '#e6ebef',
46
+ marginBottom: 17
47
+ }
48
+ });
49
+ export default EmptyStateMain;
50
+ //# sourceMappingURL=EmptyStateMain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["EmptyStateMain.js"],"names":["React","PureComponent","Text","View","ScrollView","StyleSheet","TEXT_BLUEGREY","EmptyStateMain","renderPlaceHolder","opacity","styles","item","render","container","props","style","titleText","title","itemContainer","create","borderRadius","paddingVertical","fontFamily","fontSize","color","marginTop","flexDirection","width","height","backgroundColor","marginBottom"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,aAAhB,QAAqC,OAArC;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,UAArB,EAAiCC,UAAjC,QAAmD,cAAnD;AACA,SAASC,aAAT,QAA8B,YAA9B;;AAEA,MAAMC,cAAN,SAA6BN,aAA7B,CAA2C;AACzCO,EAAAA,iBAAiB,GAAc;AAAA,QAAbC,OAAa,uEAAH,CAAG;AAC7B,wBAAO,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAE,CAACC,MAAM,CAACC,IAAR,EAAc;AAAEF,QAAAA;AAAF,OAAd;AAAb,MAAP;AACD;;AAEDG,EAAAA,MAAM,GAAG;AACP,wBACE,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAE,CAACF,MAAM,CAACG,SAAR,EAAmB,KAAKC,KAAL,CAAWC,KAA9B;AAAb,oBACE,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAEL,MAAM,CAACM;AAApB,OAAgC,KAAKF,KAAL,CAAWG,KAAX,IAAoB,qBAApD,CADF,eAEE,oBAAC,UAAD;AAAY,MAAA,KAAK,EAAEP,MAAM,CAACQ;AAA1B,OACG,KAAKV,iBAAL,CAAuB,GAAvB,CADH,EAEG,KAAKA,iBAAL,CAAuB,GAAvB,CAFH,EAGG,KAAKA,iBAAL,CAAuB,GAAvB,CAHH,CAFF,CADF;AAUD;;AAhBwC;;AAmB3C,MAAME,MAAM,GAAGL,UAAU,CAACc,MAAX,CAAkB;AAC/BN,EAAAA,SAAS,EAAE;AACTO,IAAAA,YAAY,EAAE,CADL;AAETC,IAAAA,eAAe,EAAE;AAFR,GADoB;AAK/BL,EAAAA,SAAS,EAAE;AACTM,IAAAA,UAAU,EAAE,SADH;AAETC,IAAAA,QAAQ,EAAE,EAFD;AAGTC,IAAAA,KAAK,EAAElB;AAHE,GALoB;AAU/BY,EAAAA,aAAa,EAAE;AACbO,IAAAA,SAAS,EAAE,EADE;AAEbC,IAAAA,aAAa,EAAE;AAFF,GAVgB;AAc/Bf,EAAAA,IAAI,EAAE;AACJS,IAAAA,YAAY,EAAE,CADV;AAEJO,IAAAA,KAAK,EAAE,MAFH;AAGJC,IAAAA,MAAM,EAAE,EAHJ;AAIJC,IAAAA,eAAe,EAAE,SAJb;AAKJC,IAAAA,YAAY,EAAE;AALV;AAdyB,CAAlB,CAAf;AAuBA,eAAevB,cAAf","sourcesContent":["import React, { PureComponent } from 'react';\nimport { Text, View, ScrollView, StyleSheet } from 'react-native';\nimport { TEXT_BLUEGREY } from '../colours';\n\nclass EmptyStateMain extends PureComponent {\n renderPlaceHolder(opacity = 1) {\n return <View style={[styles.item, { opacity }]} />;\n }\n\n render() {\n return (\n <View style={[styles.container, this.props.style]}>\n <Text style={styles.titleText}>{this.props.title || 'Nothing to see here'}</Text>\n <ScrollView style={styles.itemContainer}>\n {this.renderPlaceHolder(0.8)}\n {this.renderPlaceHolder(0.6)}\n {this.renderPlaceHolder(0.4)}\n </ScrollView>\n </View>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n borderRadius: 5,\n paddingVertical: 5,\n },\n titleText: {\n fontFamily: 'qs-bold',\n fontSize: 16,\n color: TEXT_BLUEGREY,\n },\n itemContainer: {\n marginTop: 20,\n flexDirection: 'column',\n },\n item: {\n borderRadius: 4,\n width: '100%',\n height: 32,\n backgroundColor: '#e6ebef',\n marginBottom: 17,\n },\n});\n\nexport default EmptyStateMain;\n"]}
@@ -0,0 +1,52 @@
1
+ import React, { PureComponent } from 'react';
2
+ import { Text, View, ScrollView, StyleSheet } from 'react-native';
3
+ import { TEXT_BLUEGREY } from '../colours';
4
+
5
+ class EmptyStateWidget extends PureComponent {
6
+ renderPlaceHolder() {
7
+ let opacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
8
+ return /*#__PURE__*/React.createElement(View, {
9
+ style: [styles.item, {
10
+ opacity
11
+ }]
12
+ });
13
+ }
14
+
15
+ render() {
16
+ return /*#__PURE__*/React.createElement(View, {
17
+ style: [styles.container, this.props.height && {
18
+ height: this.props.height
19
+ }, this.props.style]
20
+ }, /*#__PURE__*/React.createElement(Text, {
21
+ style: styles.titleText
22
+ }, this.props.title || 'Nothing to see here'), /*#__PURE__*/React.createElement(ScrollView, {
23
+ horizontal: true,
24
+ style: styles.itemContainer
25
+ }, this.renderPlaceHolder(0.8), this.renderPlaceHolder(0.6), this.renderPlaceHolder(0.4), this.renderPlaceHolder(0.2)));
26
+ }
27
+
28
+ }
29
+
30
+ const styles = StyleSheet.create({
31
+ container: {
32
+ borderRadius: 5,
33
+ paddingVertical: 5
34
+ },
35
+ titleText: {
36
+ fontFamily: 'qs-bold',
37
+ fontSize: 16,
38
+ color: TEXT_BLUEGREY
39
+ },
40
+ itemContainer: {
41
+ marginTop: 20
42
+ },
43
+ item: {
44
+ borderRadius: 4,
45
+ width: 97,
46
+ height: 98,
47
+ backgroundColor: '#e6ebef',
48
+ marginRight: 17
49
+ }
50
+ });
51
+ export default EmptyStateWidget;
52
+ //# sourceMappingURL=EmptyStateWidget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["EmptyStateWidget.js"],"names":["React","PureComponent","Text","View","ScrollView","StyleSheet","TEXT_BLUEGREY","EmptyStateWidget","renderPlaceHolder","opacity","styles","item","render","container","props","height","style","titleText","title","itemContainer","create","borderRadius","paddingVertical","fontFamily","fontSize","color","marginTop","width","backgroundColor","marginRight"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,aAAhB,QAAqC,OAArC;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,UAArB,EAAiCC,UAAjC,QAAmD,cAAnD;AACA,SAASC,aAAT,QAA8B,YAA9B;;AAEA,MAAMC,gBAAN,SAA+BN,aAA/B,CAA6C;AAC3CO,EAAAA,iBAAiB,GAAc;AAAA,QAAbC,OAAa,uEAAH,CAAG;AAC7B,wBAAO,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAE,CAACC,MAAM,CAACC,IAAR,EAAc;AAAEF,QAAAA;AAAF,OAAd;AAAb,MAAP;AACD;;AAEDG,EAAAA,MAAM,GAAG;AACP,wBACE,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAE,CAACF,MAAM,CAACG,SAAR,EAAmB,KAAKC,KAAL,CAAWC,MAAX,IAAqB;AAAEA,QAAAA,MAAM,EAAE,KAAKD,KAAL,CAAWC;AAArB,OAAxC,EAAuE,KAAKD,KAAL,CAAWE,KAAlF;AAAb,oBACE,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAEN,MAAM,CAACO;AAApB,OAAgC,KAAKH,KAAL,CAAWI,KAAX,IAAoB,qBAApD,CADF,eAEE,oBAAC,UAAD;AAAY,MAAA,UAAU,MAAtB;AAAuB,MAAA,KAAK,EAAER,MAAM,CAACS;AAArC,OACG,KAAKX,iBAAL,CAAuB,GAAvB,CADH,EAEG,KAAKA,iBAAL,CAAuB,GAAvB,CAFH,EAGG,KAAKA,iBAAL,CAAuB,GAAvB,CAHH,EAIG,KAAKA,iBAAL,CAAuB,GAAvB,CAJH,CAFF,CADF;AAWD;;AAjB0C;;AAoB7C,MAAME,MAAM,GAAGL,UAAU,CAACe,MAAX,CAAkB;AAC/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,YAAY,EAAE,CADL;AAETC,IAAAA,eAAe,EAAE;AAFR,GADoB;AAK/BL,EAAAA,SAAS,EAAE;AACTM,IAAAA,UAAU,EAAE,SADH;AAETC,IAAAA,QAAQ,EAAE,EAFD;AAGTC,IAAAA,KAAK,EAAEnB;AAHE,GALoB;AAU/Ba,EAAAA,aAAa,EAAE;AACbO,IAAAA,SAAS,EAAE;AADE,GAVgB;AAa/Bf,EAAAA,IAAI,EAAE;AACJU,IAAAA,YAAY,EAAE,CADV;AAEJM,IAAAA,KAAK,EAAE,EAFH;AAGJZ,IAAAA,MAAM,EAAE,EAHJ;AAIJa,IAAAA,eAAe,EAAE,SAJb;AAKJC,IAAAA,WAAW,EAAE;AALT;AAbyB,CAAlB,CAAf;AAsBA,eAAetB,gBAAf","sourcesContent":["import React, { PureComponent } from 'react';\nimport { Text, View, ScrollView, StyleSheet } from 'react-native';\nimport { TEXT_BLUEGREY } from '../colours';\n\nclass EmptyStateWidget extends PureComponent {\n renderPlaceHolder(opacity = 1) {\n return <View style={[styles.item, { opacity }]} />;\n }\n\n render() {\n return (\n <View style={[styles.container, this.props.height && { height: this.props.height }, this.props.style]}>\n <Text style={styles.titleText}>{this.props.title || 'Nothing to see here'}</Text>\n <ScrollView horizontal style={styles.itemContainer}>\n {this.renderPlaceHolder(0.8)}\n {this.renderPlaceHolder(0.6)}\n {this.renderPlaceHolder(0.4)}\n {this.renderPlaceHolder(0.2)}\n </ScrollView>\n </View>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n borderRadius: 5,\n paddingVertical: 5,\n },\n titleText: {\n fontFamily: 'qs-bold',\n fontSize: 16,\n color: TEXT_BLUEGREY,\n },\n itemContainer: {\n marginTop: 20,\n },\n item: {\n borderRadius: 4,\n width: 97,\n height: 98,\n backgroundColor: '#e6ebef',\n marginRight: 17,\n },\n});\n\nexport default EmptyStateWidget;\n"]}
@@ -0,0 +1,37 @@
1
+ import React, { PureComponent } from 'react';
2
+ import { TouchableOpacity, Text } from 'react-native';
3
+ import { TEXT_DARK } from '../colours';
4
+ /*
5
+ Props-
6
+ style - custom style for container
7
+ */
8
+
9
+ class FontScaleButton extends PureComponent {
10
+ render() {
11
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
12
+ style: [styles.container, this.props.style],
13
+ onPress: this.props.onPress
14
+ }, /*#__PURE__*/React.createElement(Text, {
15
+ style: styles.text
16
+ }, /*#__PURE__*/React.createElement(Text, null, "A"), /*#__PURE__*/React.createElement(Text, null, ` `), /*#__PURE__*/React.createElement(Text, {
17
+ style: styles.largeText
18
+ }, "A")));
19
+ }
20
+
21
+ }
22
+
23
+ const styles = {
24
+ container: {
25
+ padding: 15
26
+ },
27
+ text: {
28
+ fontFamily: 'sf-medium',
29
+ color: TEXT_DARK,
30
+ fontSize: 14
31
+ },
32
+ largeText: {
33
+ fontSize: 24
34
+ }
35
+ };
36
+ export { FontScaleButton };
37
+ //# sourceMappingURL=FontScaleButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["FontScaleButton.js"],"names":["React","PureComponent","TouchableOpacity","Text","TEXT_DARK","FontScaleButton","render","styles","container","props","style","onPress","text","largeText","padding","fontFamily","color","fontSize"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,aAAhB,QAAqC,OAArC;AACA,SAASC,gBAAT,EAA2BC,IAA3B,QAAuC,cAAvC;AACA,SAASC,SAAT,QAA0B,YAA1B;AAEA;AACA;AACA;AACA;;AAEA,MAAMC,eAAN,SAA8BJ,aAA9B,CAA4C;AAC1CK,EAAAA,MAAM,GAAG;AACP,wBACE,oBAAC,gBAAD;AAAkB,MAAA,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmB,KAAKC,KAAL,CAAWC,KAA9B,CAAzB;AAA+D,MAAA,OAAO,EAAE,KAAKD,KAAL,CAAWE;AAAnF,oBACE,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAEJ,MAAM,CAACK;AAApB,oBACE,oBAAC,IAAD,YADF,eAEE,oBAAC,IAAD,QAAQ,GAAR,CAFF,eAGE,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAEL,MAAM,CAACM;AAApB,WAHF,CADF,CADF;AASD;;AAXyC;;AAc5C,MAAMN,MAAM,GAAG;AACbC,EAAAA,SAAS,EAAE;AACTM,IAAAA,OAAO,EAAE;AADA,GADE;AAIbF,EAAAA,IAAI,EAAE;AACJG,IAAAA,UAAU,EAAE,WADR;AAEJC,IAAAA,KAAK,EAAEZ,SAFH;AAGJa,IAAAA,QAAQ,EAAE;AAHN,GAJO;AASbJ,EAAAA,SAAS,EAAE;AACTI,IAAAA,QAAQ,EAAE;AADD;AATE,CAAf;AAcA,SAASZ,eAAT","sourcesContent":["import React, { PureComponent } from 'react';\nimport { TouchableOpacity, Text } from 'react-native';\nimport { TEXT_DARK } from '../colours';\n\n/* \nProps- \n style - custom style for container\n*/\n\nclass FontScaleButton extends PureComponent {\n render() {\n return (\n <TouchableOpacity style={[styles.container, this.props.style]} onPress={this.props.onPress}>\n <Text style={styles.text}>\n <Text>A</Text>\n <Text>{` `}</Text>\n <Text style={styles.largeText}>A</Text>\n </Text>\n </TouchableOpacity>\n );\n }\n}\n\nconst styles = {\n container: {\n padding: 15,\n },\n text: {\n fontFamily: 'sf-medium',\n color: TEXT_DARK,\n fontSize: 14,\n },\n largeText: {\n fontSize: 24,\n },\n};\n\nexport { FontScaleButton };\n"]}