@plusscommunities/pluss-core-app 8.0.0 → 8.0.1-auth.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/actions/FollowerActions.js +4 -4
- package/dist/module/actions/FollowerActions.js.map +1 -1
- package/dist/module/actions/MediaActions.js +1 -1
- package/dist/module/actions/MediaActions.js.map +1 -1
- package/dist/module/actions/ResidentActions.js +1 -1
- package/dist/module/actions/ResidentActions.js.map +1 -1
- package/dist/module/actions/UserActions.js +1 -1
- package/dist/module/actions/UserActions.js.map +1 -1
- package/dist/module/actions/UserSettingsActions.js +1 -1
- package/dist/module/actions/UserSettingsActions.js.map +1 -1
- package/dist/module/actions/index.js +5 -5
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +16 -16
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/apis/analyticsActions.js +5 -5
- package/dist/module/apis/analyticsActions.js.map +1 -1
- package/dist/module/apis/contactActions.js +6 -6
- package/dist/module/apis/contactActions.js.map +1 -1
- package/dist/module/apis/eventActions.js +28 -28
- package/dist/module/apis/eventActions.js.map +1 -1
- package/dist/module/apis/fileActions.js +15 -15
- package/dist/module/apis/fileActions.js.map +1 -1
- package/dist/module/apis/followerActions.js +8 -8
- package/dist/module/apis/followerActions.js.map +1 -1
- package/dist/module/apis/index.js +12 -12
- package/dist/module/apis/index.js.map +1 -1
- package/dist/module/apis/notificationActions.js +17 -17
- package/dist/module/apis/notificationActions.js.map +1 -1
- package/dist/module/apis/profileActions.js +4 -4
- package/dist/module/apis/profileActions.js.map +1 -1
- package/dist/module/apis/reactionActions.js +15 -15
- package/dist/module/apis/reactionActions.js.map +1 -1
- package/dist/module/apis/settingActions.js +6 -6
- package/dist/module/apis/settingActions.js.map +1 -1
- package/dist/module/apis/stringActions.js +8 -8
- package/dist/module/apis/stringActions.js.map +1 -1
- package/dist/module/apis/typeActions.js +4 -4
- package/dist/module/apis/typeActions.js.map +1 -1
- package/dist/module/apis/userActions.js +8 -8
- package/dist/module/apis/userActions.js.map +1 -1
- package/dist/module/assets/icons/fontawesome/fa-brands-400.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-light-300.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-regular-400.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-solid-900.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-thin-100.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa7-glyphmap.json +4205 -0
- package/dist/module/colours.js +26 -29
- package/dist/module/colours.js.map +1 -1
- package/dist/module/components/AddButton.js +8 -8
- package/dist/module/components/AddButton.js.map +1 -1
- package/dist/module/components/AddToCalendarButton.js +30 -29
- package/dist/module/components/AddToCalendarButton.js.map +1 -1
- package/dist/module/components/Attachment.js +10 -9
- package/dist/module/components/Attachment.js.map +1 -1
- package/dist/module/components/AudienceSelectorLauncher.js +11 -11
- package/dist/module/components/AudienceSelectorLauncher.js.map +1 -1
- package/dist/module/components/AudienceSelectorPage.js +45 -44
- package/dist/module/components/AudienceSelectorPage.js.map +1 -1
- package/dist/module/components/AutoOffsetImage.js +13 -13
- package/dist/module/components/AutoOffsetImage.js.map +1 -1
- package/dist/module/components/BackButton.js +10 -10
- package/dist/module/components/BackButton.js.map +1 -1
- package/dist/module/components/CalendarPopup.js +21 -21
- package/dist/module/components/CalendarPopup.js.map +1 -1
- package/dist/module/components/CategoryTabs.js +30 -29
- package/dist/module/components/CategoryTabs.js.map +1 -1
- package/dist/module/components/CommentReply.js +43 -37
- package/dist/module/components/CommentReply.js.map +1 -1
- package/dist/module/components/CommentSection.js +74 -74
- package/dist/module/components/CommentSection.js.map +1 -1
- package/dist/module/components/ConfirmPopup.js +21 -20
- package/dist/module/components/ConfirmPopup.js.map +1 -1
- package/dist/module/components/ConfirmationPopup.js +11 -11
- package/dist/module/components/ConfirmationPopup.js.map +1 -1
- package/dist/module/components/DocumentUploader.js +50 -50
- package/dist/module/components/DocumentUploader.js.map +1 -1
- package/dist/module/components/DropDownItem.js +14 -13
- package/dist/module/components/DropDownItem.js.map +1 -1
- package/dist/module/components/DropDownMenu.js +5 -5
- package/dist/module/components/DropDownMenu.js.map +1 -1
- package/dist/module/components/EmptyStateMain.js +10 -9
- package/dist/module/components/EmptyStateMain.js.map +1 -1
- package/dist/module/components/EmptyStateWidget.js +7 -6
- package/dist/module/components/EmptyStateWidget.js.map +1 -1
- package/dist/module/components/FontScaleButton.js +5 -4
- package/dist/module/components/FontScaleButton.js.map +1 -1
- package/dist/module/components/FontScalePopup.js +11 -10
- package/dist/module/components/FontScalePopup.js.map +1 -1
- package/dist/module/components/Forbidden.js +13 -13
- package/dist/module/components/Forbidden.js.map +1 -1
- package/dist/module/components/FormCard.js +4 -4
- package/dist/module/components/FormCard.js.map +1 -1
- package/dist/module/components/FormCardSection.js +20 -18
- package/dist/module/components/FormCardSection.js.map +1 -1
- package/dist/module/components/FormCardSectionOptionLauncher.js +13 -12
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -1
- package/dist/module/components/FormattedText.js +18 -16
- package/dist/module/components/FormattedText.js.map +1 -1
- package/dist/module/components/GenericInput.js +24 -21
- package/dist/module/components/GenericInput.js.map +1 -1
- package/dist/module/components/GenericInputSection.js +27 -26
- package/dist/module/components/GenericInputSection.js.map +1 -1
- package/dist/module/components/Header.js +70 -69
- package/dist/module/components/Header.js.map +1 -1
- package/dist/module/components/Icon.js +109 -0
- package/dist/module/components/Icon.js.map +1 -0
- package/dist/module/components/ImagePopup.js +211 -73
- package/dist/module/components/ImagePopup.js.map +1 -1
- package/dist/module/components/ImageUploadProgress.js +10 -9
- package/dist/module/components/ImageUploadProgress.js.map +1 -1
- package/dist/module/components/ImageUploader.js +116 -96
- package/dist/module/components/ImageUploader.js.map +1 -1
- package/dist/module/components/InlineButton.js +9 -8
- package/dist/module/components/InlineButton.js.map +1 -1
- package/dist/module/components/Input.js +28 -26
- package/dist/module/components/Input.js.map +1 -1
- package/dist/module/components/LoadingCircles.js +20 -20
- package/dist/module/components/LoadingCircles.js.map +1 -1
- package/dist/module/components/LoadingIndicator.js +11 -11
- package/dist/module/components/LoadingIndicator.js.map +1 -1
- package/dist/module/components/LoadingStateWidget.js +5 -5
- package/dist/module/components/LoadingStateWidget.js.map +1 -1
- package/dist/module/components/MediaPlayer.js +31 -31
- package/dist/module/components/MediaPlayer.js.map +1 -1
- package/dist/module/components/MiddlePopup.js +17 -11
- package/dist/module/components/MiddlePopup.js.map +1 -1
- package/dist/module/components/PDFPopup.js +52 -39
- package/dist/module/components/PDFPopup.js.map +1 -1
- package/dist/module/components/PlussChat.js +168 -149
- package/dist/module/components/PlussChat.js.map +1 -1
- package/dist/module/components/PlussChatMessage.js +42 -42
- package/dist/module/components/PlussChatMessage.js.map +1 -1
- package/dist/module/components/PlussChatTime.js +18 -17
- package/dist/module/components/PlussChatTime.js.map +1 -1
- package/dist/module/components/Popup.js +20 -19
- package/dist/module/components/Popup.js.map +1 -1
- package/dist/module/components/PopupMenu.js +15 -14
- package/dist/module/components/PopupMenu.js.map +1 -1
- package/dist/module/components/PositionedImage.js +20 -20
- package/dist/module/components/PositionedImage.js.map +1 -1
- package/dist/module/components/ProfilePic.js +10 -10
- package/dist/module/components/ProfilePic.js.map +1 -1
- package/dist/module/components/RadioButton.js +10 -9
- package/dist/module/components/RadioButton.js.map +1 -1
- package/dist/module/components/Reaction.js +18 -17
- package/dist/module/components/Reaction.js.map +1 -1
- package/dist/module/components/Reactions.js +7 -7
- package/dist/module/components/Reactions.js.map +1 -1
- package/dist/module/components/SharingTools.js +78 -43
- package/dist/module/components/SharingTools.js.map +1 -1
- package/dist/module/components/Spinner.js +5 -5
- package/dist/module/components/Spinner.js.map +1 -1
- package/dist/module/components/StickyFooter.js +6 -6
- package/dist/module/components/StickyFooter.js.map +1 -1
- package/dist/module/components/Text.js +57 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/TickIcon.js +6 -6
- package/dist/module/components/TickIcon.js.map +1 -1
- package/dist/module/components/Toggle.js +10 -9
- package/dist/module/components/Toggle.js.map +1 -1
- package/dist/module/components/TouchableSearchBar.js +18 -17
- package/dist/module/components/TouchableSearchBar.js.map +1 -1
- package/dist/module/components/UserListPopup.js +20 -19
- package/dist/module/components/UserListPopup.js.map +1 -1
- package/dist/module/components/UserListing.js +41 -40
- package/dist/module/components/UserListing.js.map +1 -1
- package/dist/module/components/VideoPopup.js +20 -20
- package/dist/module/components/VideoPopup.js.map +1 -1
- package/dist/module/components/WarningPopup.js +21 -20
- package/dist/module/components/WarningPopup.js.map +1 -1
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +13 -13
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -1
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +24 -23
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -1
- package/dist/module/components/index.js +59 -58
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +94 -64
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -1
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +64 -64
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -1
- package/dist/module/config.js +15 -10
- package/dist/module/config.js.map +1 -1
- package/dist/module/constants.js +3 -4
- package/dist/module/constants.js.map +1 -1
- package/dist/module/helper.js +83 -82
- package/dist/module/helper.js.map +1 -1
- package/dist/module/index.js +12 -12
- package/dist/module/index.js.map +1 -1
- package/dist/module/js/images/detectFaces.js +11 -10
- package/dist/module/js/images/detectFaces.js.map +1 -1
- package/dist/module/js/images/findLandmarkRange.js +8 -8
- package/dist/module/js/images/findLandmarkRange.js.map +1 -1
- package/dist/module/js/images/getScaledOffset.js.map +1 -1
- package/dist/module/js/site/getSiteLevelFromState.js +2 -2
- package/dist/module/js/site/getSiteLevelFromState.js.map +1 -1
- package/dist/module/js/site/isTVEnabled.js +2 -2
- package/dist/module/js/site/isTVEnabled.js.map +1 -1
- package/dist/module/session.js +6 -6
- package/dist/module/session.js.map +1 -1
- package/dist/module/styles.js +17 -17
- package/dist/module/styles.js.map +1 -1
- package/dist/module/withNavigationFocus.js +30 -0
- package/dist/module/withNavigationFocus.js.map +1 -0
- package/package.json +71 -68
- package/src/actions/FollowerActions.js +36 -32
- package/src/actions/MediaActions.js +25 -20
- package/src/actions/ResidentActions.js +26 -21
- package/src/actions/UserActions.js +22 -22
- package/src/actions/UserSettingsActions.js +11 -11
- package/src/actions/index.js +5 -5
- package/src/actions/types.js +16 -16
- package/src/apis/analyticsActions.js +17 -17
- package/src/apis/contactActions.js +20 -20
- package/src/apis/eventActions.js +153 -144
- package/src/apis/fileActions.js +96 -86
- package/src/apis/followerActions.js +29 -29
- package/src/apis/index.js +12 -12
- package/src/apis/notificationActions.js +44 -44
- package/src/apis/profileActions.js +8 -8
- package/src/apis/reactionActions.js +81 -73
- package/src/apis/settingActions.js +15 -15
- package/src/apis/stringActions.js +29 -25
- package/src/apis/typeActions.js +10 -10
- package/src/apis/userActions.js +93 -93
- package/src/assets/icons/fontawesome/fa-brands-400.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-light-300.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-regular-400.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-solid-900.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-thin-100.ttf +0 -0
- package/src/assets/icons/fontawesome/fa7-glyphmap.json +4205 -0
- package/src/colours.js +116 -96
- package/src/components/AddButton.js +32 -27
- package/src/components/AddToCalendarButton.js +236 -202
- package/src/components/Attachment.js +59 -36
- package/src/components/AudienceSelectorLauncher.js +52 -48
- package/src/components/AudienceSelectorPage.js +353 -311
- package/src/components/AutoOffsetImage.js +237 -196
- package/src/components/BackButton.js +57 -41
- package/src/components/CalendarPopup.js +127 -97
- package/src/components/CategoryTabs.js +208 -163
- package/src/components/CommentReply.js +370 -309
- package/src/components/CommentSection.js +974 -781
- package/src/components/ConfirmPopup.js +141 -110
- package/src/components/ConfirmationPopup.js +80 -69
- package/src/components/DocumentUploader.js +245 -215
- package/src/components/DropDownItem.js +70 -60
- package/src/components/DropDownMenu.js +31 -27
- package/src/components/EmptyStateMain.js +51 -44
- package/src/components/EmptyStateWidget.js +47 -38
- package/src/components/FontScaleButton.js +29 -25
- package/src/components/FontScalePopup.js +67 -56
- package/src/components/Forbidden.js +48 -46
- package/src/components/FormCard.js +21 -17
- package/src/components/FormCardSection.js +284 -233
- package/src/components/FormCardSectionOptionLauncher.js +72 -46
- package/src/components/FormattedText.js +128 -111
- package/src/components/GenericInput.js +168 -136
- package/src/components/GenericInputSection.js +209 -161
- package/src/components/Header.js +620 -474
- package/src/components/Icon.js +119 -0
- package/src/components/ImagePopup.js +425 -221
- package/src/components/ImageUploadProgress.js +49 -41
- package/src/components/ImageUploader.js +968 -797
- package/src/components/InlineButton.js +79 -69
- package/src/components/Input.js +190 -156
- package/src/components/LoadingCircles.js +233 -233
- package/src/components/LoadingIndicator.js +87 -76
- package/src/components/LoadingStateWidget.js +47 -37
- package/src/components/MediaPlayer.js +416 -387
- package/src/components/MiddlePopup.js +62 -33
- package/src/components/PDFPopup.js +212 -159
- package/src/components/PlussChat.js +1224 -1025
- package/src/components/PlussChatMessage.js +329 -298
- package/src/components/PlussChatTime.js +57 -53
- package/src/components/Popup.js +138 -116
- package/src/components/PopupMenu.js +140 -110
- package/src/components/PositionedImage.js +281 -237
- package/src/components/ProfilePic.js +122 -113
- package/src/components/RadioButton.js +76 -52
- package/src/components/Reaction.js +134 -96
- package/src/components/Reactions.js +65 -63
- package/src/components/SharingTools.js +185 -134
- package/src/components/Spinner.js +13 -13
- package/src/components/StickyFooter.js +36 -26
- package/src/components/Text.js +62 -0
- package/src/components/TickIcon.js +20 -20
- package/src/components/Toggle.js +74 -73
- package/src/components/TouchableSearchBar.js +68 -50
- package/src/components/UserListPopup.js +161 -124
- package/src/components/UserListing.js +273 -238
- package/src/components/VideoPopup.js +110 -96
- package/src/components/WarningPopup.js +92 -71
- package/src/components/expo-image-picker-multiple/ImageBrowser.js +288 -256
- package/src/components/expo-image-picker-multiple/ImageTile.js +108 -84
- package/src/components/index.js +59 -58
- package/src/components/react-native-expo-image-cropper/ExpoImageManipulator.js +444 -359
- package/src/components/react-native-expo-image-cropper/ImageCropOverlay.js +420 -324
- package/src/config.js +26 -21
- package/src/constants.js +8 -10
- package/src/helper.js +469 -438
- package/src/index.js +24 -12
- package/src/js/images/detectFaces.js +28 -21
- package/src/js/images/findLandmarkRange.js +97 -90
- package/src/js/images/getScaledOffset.js +80 -75
- package/src/js/site/getSiteLevelFromState.js +26 -26
- package/src/js/site/isTVEnabled.js +10 -10
- package/src/session.js +32 -32
- package/src/styles.js +61 -61
- package/src/withNavigationFocus.js +28 -0
- package/dist/module/components/TextStyle.js +0 -45
- package/dist/module/components/TextStyle.js.map +0 -1
- package/dist/module/fonts/index.js +0 -2
- package/dist/module/fonts/index.js.map +0 -1
- package/dist/module/fonts/pluss60-icons.js +0 -5
- package/dist/module/fonts/pluss60-icons.js.map +0 -1
- package/dist/module/fonts/pluss60-icons.json +0 -1097
- package/src/components/TextStyle.js +0 -48
- package/src/fonts/index.js +0 -1
- package/src/fonts/pluss60-icons.js +0 -7
- package/src/fonts/pluss60-icons.json +0 -1097
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","TouchableOpacity","
|
|
1
|
+
{"version":3,"names":["React","PureComponent","TouchableOpacity","View","Text","TEXT_DARK","LINEGREY","FontScalePopup","render","props","visible","createElement","style","styles","container","button","buttonLeft","buttonLeftStyle","onPress","onPressSmall","smallText","buttonRight","buttonRightStyle","onPressLarge","largeText","flexDirection","borderRadius","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","zIndex","backgroundColor","padding","borderColor","alignItems","justifyContent","borderRightWidth","borderLeftWidth","fontFamily","color","fontSize"],"sources":["FontScalePopup.js"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport { TouchableOpacity, View } from \"react-native\";\nimport { Text } from \"./Text\";\nimport { TEXT_DARK, LINEGREY } from \"../colours\";\n\n/* \nProps- \n style - custom style for container\n buttonLeftStyle - custom style for left button\n buttonRightStyle - custom style for right button\n onPressSmall - callback function \n onPressLarge - custom style for right button\n*/\n\nclass FontScalePopup extends PureComponent {\n\trender() {\n\t\tif (!this.props.visible) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={[styles.container, this.props.style]}>\n\t\t\t\t<TouchableOpacity\n\t\t\t\t\tstyle={[styles.button, styles.buttonLeft, this.props.buttonLeftStyle]}\n\t\t\t\t\tonPress={this.props.onPressSmall}\n\t\t\t\t>\n\t\t\t\t\t<Text style={styles.smallText}>A</Text>\n\t\t\t\t</TouchableOpacity>\n\t\t\t\t<TouchableOpacity\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\tstyles.button,\n\t\t\t\t\t\tstyles.buttonRight,\n\t\t\t\t\t\tthis.props.buttonRightStyle,\n\t\t\t\t\t]}\n\t\t\t\t\tonPress={this.props.onPressLarge}\n\t\t\t\t>\n\t\t\t\t\t<Text style={styles.largeText}>A</Text>\n\t\t\t\t</TouchableOpacity>\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tcontainer: {\n\t\tflexDirection: \"row\",\n\t\tborderRadius: 2,\n\t\tshadowColor: \"#000\",\n\t\tshadowOffset: {\n\t\t\twidth: 0,\n\t\t\theight: 2,\n\t\t},\n\t\tshadowOpacity: 0.2,\n\t\tshadowRadius: 4,\n\t\televation: 4,\n\t\tzIndex: 10,\n\t\tbackgroundColor: \"#fff\",\n\t\tpadding: 2,\n\t},\n\tbutton: {\n\t\theight: 50,\n\t\twidth: 64,\n\t\tborderColor: LINEGREY,\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t},\n\tbuttonLeft: {\n\t\tborderRightWidth: 1,\n\t},\n\tbuttonRight: {\n\t\tborderLeftWidth: 1,\n\t},\n\tsmallText: {\n\t\tfontFamily: \"sf-medium\",\n\t\tcolor: TEXT_DARK,\n\t\tfontSize: 16,\n\t},\n\tlargeText: {\n\t\tfontFamily: \"sf-medium\",\n\t\tcolor: TEXT_DARK,\n\t\tfontSize: 24,\n\t},\n};\n\nexport { FontScalePopup };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,SAAS,EAAEC,QAAQ,QAAQ,YAAY;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,cAAc,SAASN,aAAa,CAAC;EAC1CO,MAAMA,CAAA,EAAG;IACR,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,OAAO,EAAE;MACxB,OAAO,IAAI;IACZ;IACA,oBACCV,KAAA,CAAAW,aAAA,CAACR,IAAI;MAACS,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAE,IAAI,CAACL,KAAK,CAACG,KAAK;IAAE,gBACjDZ,KAAA,CAAAW,aAAA,CAACT,gBAAgB;MAChBU,KAAK,EAAE,CAACC,MAAM,CAACE,MAAM,EAAEF,MAAM,CAACG,UAAU,EAAE,IAAI,CAACP,KAAK,CAACQ,eAAe,CAAE;MACtEC,OAAO,EAAE,IAAI,CAACT,KAAK,CAACU;IAAa,gBAEjCnB,KAAA,CAAAW,aAAA,CAACP,IAAI;MAACQ,KAAK,EAAEC,MAAM,CAACO;IAAU,GAAC,GAAO,CACrB,CAAC,eACnBpB,KAAA,CAAAW,aAAA,CAACT,gBAAgB;MAChBU,KAAK,EAAE,CACNC,MAAM,CAACE,MAAM,EACbF,MAAM,CAACQ,WAAW,EAClB,IAAI,CAACZ,KAAK,CAACa,gBAAgB,CAC1B;MACFJ,OAAO,EAAE,IAAI,CAACT,KAAK,CAACc;IAAa,gBAEjCvB,KAAA,CAAAW,aAAA,CAACP,IAAI;MAACQ,KAAK,EAAEC,MAAM,CAACW;IAAU,GAAC,GAAO,CACrB,CACb,CAAC;EAET;AACD;AAEA,MAAMX,MAAM,GAAG;EACdC,SAAS,EAAE;IACVW,aAAa,EAAE,KAAK;IACpBC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MACbC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE;IACT,CAAC;IACDC,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,MAAM,EAAE,EAAE;IACVC,eAAe,EAAE,MAAM;IACvBC,OAAO,EAAE;EACV,CAAC;EACDrB,MAAM,EAAE;IACPe,MAAM,EAAE,EAAE;IACVD,KAAK,EAAE,EAAE;IACTQ,WAAW,EAAE/B,QAAQ;IACrBgC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EACjB,CAAC;EACDvB,UAAU,EAAE;IACXwB,gBAAgB,EAAE;EACnB,CAAC;EACDnB,WAAW,EAAE;IACZoB,eAAe,EAAE;EAClB,CAAC;EACDrB,SAAS,EAAE;IACVsB,UAAU,EAAE,WAAW;IACvBC,KAAK,EAAEtC,SAAS;IAChBuC,QAAQ,EAAE;EACX,CAAC;EACDpB,SAAS,EAAE;IACVkB,UAAU,EAAE,WAAW;IACvBC,KAAK,EAAEtC,SAAS;IAChBuC,QAAQ,EAAE;EACX;AACD,CAAC;AAED,SAASrC,cAAc","ignoreList":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import _ from
|
|
3
|
-
import { View } from
|
|
4
|
-
import {
|
|
5
|
-
import { getMainBrandingColourFromState } from
|
|
6
|
-
import { InlineButton } from
|
|
7
|
-
import { Services } from
|
|
8
|
-
import { connect } from
|
|
9
|
-
import Header from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import { Text } from ".";
|
|
5
|
+
import { getMainBrandingColourFromState } from "../colours";
|
|
6
|
+
import { InlineButton } from "./InlineButton";
|
|
7
|
+
import { Services } from "../config";
|
|
8
|
+
import { connect } from "react-redux";
|
|
9
|
+
import Header from "./Header";
|
|
10
10
|
const Forbidden = ({
|
|
11
11
|
colourBrandingMain,
|
|
12
12
|
title,
|
|
@@ -18,7 +18,7 @@ const Forbidden = ({
|
|
|
18
18
|
return /*#__PURE__*/React.createElement(View, {
|
|
19
19
|
style: {
|
|
20
20
|
flex: 1,
|
|
21
|
-
backgroundColor:
|
|
21
|
+
backgroundColor: "#fff"
|
|
22
22
|
}
|
|
23
23
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
24
24
|
leftIcon: "angle-left",
|
|
@@ -27,17 +27,17 @@ const Forbidden = ({
|
|
|
27
27
|
style: {
|
|
28
28
|
padding: 16
|
|
29
29
|
}
|
|
30
|
-
}, /*#__PURE__*/React.createElement(
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
31
31
|
type: "pageHeading",
|
|
32
32
|
style: {
|
|
33
33
|
color: colourBrandingMain
|
|
34
34
|
}
|
|
35
|
-
}, !_.isEmpty(title) ? title :
|
|
35
|
+
}, !_.isEmpty(title) ? title : "Oops!"), /*#__PURE__*/React.createElement(Text, {
|
|
36
36
|
type: "body",
|
|
37
37
|
style: {
|
|
38
38
|
marginTop: 10
|
|
39
39
|
}
|
|
40
|
-
}, !_.isEmpty(description) ? description :
|
|
40
|
+
}, !_.isEmpty(description) ? description : "It seems this item is no longer accessible. It may have been removed or your access might have changed."), /*#__PURE__*/React.createElement(View, {
|
|
41
41
|
style: {
|
|
42
42
|
marginTop: 20
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_","View","
|
|
1
|
+
{"version":3,"names":["React","_","View","Text","getMainBrandingColourFromState","InlineButton","Services","connect","Header","Forbidden","colourBrandingMain","title","description","goBack","navigation","createElement","style","flex","backgroundColor","leftIcon","onPressLeft","padding","type","color","isEmpty","marginTop","onPress","mapStateToProps","state","forbidden","forwardRef"],"sources":["Forbidden.js"],"sourcesContent":["import React from \"react\";\nimport _ from \"lodash\";\nimport { View } from \"react-native\";\nimport { Text } from \".\";\nimport { getMainBrandingColourFromState } from \"../colours\";\nimport { InlineButton } from \"./InlineButton\";\nimport { Services } from \"../config\";\nimport { connect } from \"react-redux\";\nimport Header from \"./Header\";\n\nconst Forbidden = ({ colourBrandingMain, title, description }) => {\n\tconst goBack = () => {\n\t\tServices.navigation.goBack();\n\t};\n\n\treturn (\n\t\t<View\n\t\t\tstyle={{\n\t\t\t\tflex: 1,\n\t\t\t\tbackgroundColor: \"#fff\",\n\t\t\t}}\n\t\t>\n\t\t\t<Header leftIcon=\"angle-left\" onPressLeft={goBack} />\n\t\t\t<View\n\t\t\t\tstyle={{\n\t\t\t\t\tpadding: 16,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<Text type=\"pageHeading\" style={{ color: colourBrandingMain }}>\n\t\t\t\t\t{!_.isEmpty(title) ? title : \"Oops!\"}\n\t\t\t\t</Text>\n\t\t\t\t<Text type=\"body\" style={{ marginTop: 10 }}>\n\t\t\t\t\t{!_.isEmpty(description)\n\t\t\t\t\t\t? description\n\t\t\t\t\t\t: \"It seems this item is no longer accessible. It may have been removed or your access might have changed.\"}\n\t\t\t\t</Text>\n\t\t\t\t<View style={{ marginTop: 20 }}>\n\t\t\t\t\t<InlineButton onPress={goBack} color={colourBrandingMain}>\n\t\t\t\t\t\tGo back\n\t\t\t\t\t</InlineButton>\n\t\t\t\t</View>\n\t\t\t</View>\n\t\t</View>\n\t);\n};\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t};\n};\n\nconst forbidden = connect(mapStateToProps, {}, null, { forwardRef: true })(\n\tForbidden,\n);\nexport { forbidden as Forbidden };\n"],"mappings":"AAAA,OAAOA,KAAK,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AAE;IAAG;EAAE,gBAC9BzB,KAAA,CAAAe,aAAA,CAACV,YAAY;IAACqB,OAAO,EAAEb,MAAO;IAACU,KAAK,EAAEb;EAAmB,GAAC,SAE5C,CACT,CACD,CACD,CAAC;AAET,CAAC;AAED,MAAMiB,eAAe,GAAIC,KAAK,IAAK;EAClC,OAAO;IACNlB,kBAAkB,EAAEN,8BAA8B,CAACwB,KAAK;EACzD,CAAC;AACF,CAAC;AAED,MAAMC,SAAS,GAAGtB,OAAO,CAACoB,eAAe,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE;EAAEG,UAAU,EAAE;AAAK,CAAC,CAAC,CACzErB,SACD,CAAC;AACD,SAASoB,SAAS,IAAIpB,SAAS","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { PureComponent } from
|
|
2
|
-
import { View } from
|
|
1
|
+
import React, { PureComponent } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
3
|
class FormCard extends PureComponent {
|
|
4
4
|
render() {
|
|
5
5
|
return /*#__PURE__*/React.createElement(View, {
|
|
@@ -9,9 +9,9 @@ class FormCard extends PureComponent {
|
|
|
9
9
|
}
|
|
10
10
|
const styles = {
|
|
11
11
|
section: {
|
|
12
|
-
backgroundColor:
|
|
12
|
+
backgroundColor: "#fff",
|
|
13
13
|
paddingHorizontal: 16,
|
|
14
|
-
shadowColor:
|
|
14
|
+
shadowColor: "#000",
|
|
15
15
|
shadowOffset: {
|
|
16
16
|
width: 0,
|
|
17
17
|
height: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","View","FormCard","render","createElement","style","styles","section","props","children","backgroundColor","paddingHorizontal","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation"],"sources":["FormCard.js"],"sourcesContent":["import React, { PureComponent } from
|
|
1
|
+
{"version":3,"names":["React","PureComponent","View","FormCard","render","createElement","style","styles","section","props","children","backgroundColor","paddingHorizontal","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation"],"sources":["FormCard.js"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport { View } from \"react-native\";\n\nclass FormCard extends PureComponent {\n\trender() {\n\t\treturn (\n\t\t\t<View style={[styles.section, this.props.style]}>\n\t\t\t\t{this.props.children}\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tsection: {\n\t\tbackgroundColor: \"#fff\",\n\t\tpaddingHorizontal: 16,\n\t\tshadowColor: \"#000\",\n\t\tshadowOffset: {\n\t\t\twidth: 0,\n\t\t\theight: 1,\n\t\t},\n\t\tshadowOpacity: 0.1,\n\t\tshadowRadius: 6,\n\t\televation: 2,\n\t},\n};\n\nexport { FormCard };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,IAAI,QAAQ,cAAc;AAEnC,MAAMC,QAAQ,SAASF,aAAa,CAAC;EACpCG,MAAMA,CAAA,EAAG;IACR,oBACCJ,KAAA,CAAAK,aAAA,CAACH,IAAI;MAACI,KAAK,EAAE,CAACC,MAAM,CAACC,OAAO,EAAE,IAAI,CAACC,KAAK,CAACH,KAAK;IAAE,GAC9C,IAAI,CAACG,KAAK,CAACC,QACP,CAAC;EAET;AACD;AAEA,MAAMH,MAAM,GAAG;EACdC,OAAO,EAAE;IACRG,eAAe,EAAE,MAAM;IACvBC,iBAAiB,EAAE,EAAE;IACrBC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MACbC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE;IACT,CAAC;IACDC,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACZ;AACD,CAAC;AAED,SAAShB,QAAQ","ignoreList":[]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { TEXT_LIGHTER, TEXT_DARK, COLOUR_GREEN, LINEGREY, TEXT_LIGHT, COLOUR_GRAPEFRUIT, getMainBrandingColourFromState, getDarkBrandingColourFromState } from
|
|
7
|
-
import { getValueOrDefault } from
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import { Text } from "@plusscommunities/pluss-core-app/components";
|
|
3
|
+
import _ from "lodash";
|
|
4
|
+
import { View, TextInput, TouchableOpacity, StyleSheet } from "react-native";
|
|
5
|
+
import { connect } from "react-redux";
|
|
6
|
+
import { TEXT_LIGHTER, TEXT_DARK, COLOUR_GREEN, LINEGREY, TEXT_LIGHT, COLOUR_GRAPEFRUIT, getMainBrandingColourFromState, getDarkBrandingColourFromState } from "../colours";
|
|
7
|
+
import { getValueOrDefault } from "../helper";
|
|
8
|
+
import { FontAwesome } from "./Icon";
|
|
8
9
|
class FormCardSection extends Component {
|
|
9
10
|
constructor(props) {
|
|
10
11
|
super(props);
|
|
@@ -81,13 +82,14 @@ class FormCardSection extends Component {
|
|
|
81
82
|
renderInput() {
|
|
82
83
|
return /*#__PURE__*/React.createElement(View, {
|
|
83
84
|
style: {
|
|
84
|
-
flexDirection:
|
|
85
|
+
flexDirection: "row"
|
|
85
86
|
}
|
|
86
87
|
}, /*#__PURE__*/React.createElement(View, {
|
|
87
88
|
style: {
|
|
88
89
|
flex: 1
|
|
89
90
|
}
|
|
90
91
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
92
|
+
maxFontSizeMultiplier: 1.2,
|
|
91
93
|
value: this.props.textValue,
|
|
92
94
|
onChangeText: this.props.onChangeText,
|
|
93
95
|
keyboardType: this.props.keyboardType
|
|
@@ -96,11 +98,11 @@ class FormCardSection extends Component {
|
|
|
96
98
|
placeholder: this.props.placeholder,
|
|
97
99
|
placeholderTextColor: this.props.placeholderTextColor || TEXT_LIGHTER,
|
|
98
100
|
style: [styles.inputStyle, {
|
|
99
|
-
textAlignVertical: this.props.autoGrow ?
|
|
101
|
+
textAlignVertical: this.props.autoGrow ? "top" : "center",
|
|
100
102
|
color: this.props.textColour || TEXT_DARK,
|
|
101
103
|
minHeight: this.props.minHeight || 20
|
|
102
104
|
}, this.props.textStyle],
|
|
103
|
-
underlineColorAndroid:
|
|
105
|
+
underlineColorAndroid: "rgba(0,0,0,0)"
|
|
104
106
|
/* Other Props */,
|
|
105
107
|
autoFocus: _.isUndefined(this.props.autoFocus) ? false : this.props.autoFocus,
|
|
106
108
|
editable: _.isUndefined(this.props.editable) ? true : this.props.editable,
|
|
@@ -108,15 +110,15 @@ class FormCardSection extends Component {
|
|
|
108
110
|
autoCorrect: _.isUndefined(this.props.autoCorrect) ? false : this.props.autoCorrect,
|
|
109
111
|
multiline: _.isUndefined(this.props.multiline) ? false : this.props.multiline,
|
|
110
112
|
autoGrow: _.isUndefined(this.props.autoGrow) ? false : this.props.autoGrow,
|
|
111
|
-
autoCapitalize: _.isUndefined(this.props.autoCapitalize) ?
|
|
113
|
+
autoCapitalize: _.isUndefined(this.props.autoCapitalize) ? "sentences" : this.props.autoCapitalize,
|
|
112
114
|
onContentSizeChange: this.onGrow.bind(this)
|
|
113
115
|
/* Focus Props */,
|
|
114
116
|
onFocus: this.onFocus.bind(this),
|
|
115
117
|
onBlur: this.onBlur.bind(this)
|
|
116
118
|
})), !_.isUndefined(this.props.secureTextToggle) && this.props.secureTextToggle && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
117
119
|
onPress: this.toggleSecure.bind(this)
|
|
118
|
-
}, /*#__PURE__*/React.createElement(
|
|
119
|
-
name: this.state.isSecure ?
|
|
120
|
+
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
121
|
+
name: this.state.isSecure ? "eye" : "eye-slash",
|
|
120
122
|
style: {
|
|
121
123
|
fontSize: 21,
|
|
122
124
|
lineHeight: 20,
|
|
@@ -163,12 +165,12 @@ const styles = StyleSheet.create({
|
|
|
163
165
|
borderBottomColor: COLOUR_GRAPEFRUIT
|
|
164
166
|
},
|
|
165
167
|
labelContainer: {
|
|
166
|
-
flexDirection:
|
|
167
|
-
alignItems:
|
|
168
|
+
flexDirection: "row",
|
|
169
|
+
alignItems: "center",
|
|
168
170
|
marginBottom: 6
|
|
169
171
|
},
|
|
170
172
|
labelText: {
|
|
171
|
-
fontFamily:
|
|
173
|
+
fontFamily: "sf-regular",
|
|
172
174
|
fontSize: 13,
|
|
173
175
|
color: TEXT_LIGHT
|
|
174
176
|
},
|
|
@@ -189,7 +191,7 @@ const styles = StyleSheet.create({
|
|
|
189
191
|
backgroundColor: COLOUR_GREEN
|
|
190
192
|
},
|
|
191
193
|
inputStyle: {
|
|
192
|
-
fontFamily:
|
|
194
|
+
fontFamily: "sf-regular",
|
|
193
195
|
fontSize: 17,
|
|
194
196
|
margin: 0,
|
|
195
197
|
padding: 0
|
|
@@ -197,7 +199,7 @@ const styles = StyleSheet.create({
|
|
|
197
199
|
errorText: {
|
|
198
200
|
paddingTop: 8,
|
|
199
201
|
fontSize: 13,
|
|
200
|
-
fontFamily:
|
|
202
|
+
fontFamily: "sf-regular",
|
|
201
203
|
color: COLOUR_GRAPEFRUIT
|
|
202
204
|
}
|
|
203
205
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","_","View","Text","TextInput","TouchableOpacity","StyleSheet","connect","Pl60Icon","TEXT_LIGHTER","TEXT_DARK","COLOUR_GREEN","LINEGREY","TEXT_LIGHT","COLOUR_GRAPEFRUIT","getMainBrandingColourFromState","getDarkBrandingColourFromState","getValueOrDefault","FormCardSection","constructor","props","state","height","minHeight","focused","isSecure","onFocus","setState","onBlur","onGrow","event","Math","max","nativeEvent","contentSize","toggleSecure","current","showSecure","isUndefined","secureTextToggle","secureTextEntry","isValid","required","isEmpty","textValue","renderErrorDot","hasError","createElement","style","styles","errorDot","backgroundColor","colourBrandingMain","errorError","errorValid","errorDotStyle","renderLabel","label","labelContainer","labelText","color","labelError","labelStyle","renderInput","flexDirection","flex","value","onChangeText","keyboardType","selectionColor","colourBrandingDark","placeholder","placeholderTextColor","inputStyle","textAlignVertical","autoGrow","textColour","textStyle","underlineColorAndroid","autoFocus","editable","autoCorrect","multiline","autoCapitalize","onContentSizeChange","bind","onPress","name","fontSize","lineHeight","paddingLeft","renderContent","hasContent","children","pointerEvents","render","sectionItem","hasUnderline","sectionItemUnderline","inputFocus","borderBottomColor","inputError","showError","sectionStyle","errorText","create","paddingVertical","paddingHorizontal","borderBottomWidth","alignItems","marginBottom","fontFamily","width","borderRadius","marginLeft","margin","padding","paddingTop","mapStateToProps","formCardSection"],"sources":["FormCardSection.js"],"sourcesContent":["import React, { Component } from 'react';\nimport _ from 'lodash';\nimport { View, Text, TextInput, TouchableOpacity, StyleSheet } from 'react-native';\nimport { connect } from 'react-redux';\nimport { Pl60Icon } from '../fonts';\nimport {\n TEXT_LIGHTER,\n TEXT_DARK,\n COLOUR_GREEN,\n LINEGREY,\n TEXT_LIGHT,\n COLOUR_GRAPEFRUIT,\n getMainBrandingColourFromState,\n getDarkBrandingColourFromState,\n} from '../colours';\nimport { getValueOrDefault } from '../helper';\n\nclass FormCardSection extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n height: getValueOrDefault(this.props.minHeight, 20),\n focused: false,\n isSecure: true,\n };\n }\n\n onFocus() {\n this.setState({ focused: true });\n if (this.props.onFocus) {\n this.props.onFocus();\n }\n }\n\n onBlur() {\n this.setState({ focused: false });\n if (this.props.onBlur) {\n this.props.onBlur();\n }\n }\n\n onGrow(event) {\n this.setState({\n height: Math.max(event.nativeEvent.contentSize.height, this.props.minHeight),\n });\n }\n\n toggleSecure() {\n const current = this.state.isSecure;\n this.setState({ isSecure: !current });\n }\n\n showSecure() {\n if (!_.isUndefined(this.props.secureTextToggle) && this.props.secureTextToggle) {\n return this.state.isSecure;\n }\n return this.props.secureTextEntry;\n }\n\n isValid() {\n if (this.props.required && _.isEmpty(this.props.textValue)) {\n return false;\n }\n if (this.props.isValid && !this.props.isValid()) {\n return false;\n }\n return true;\n }\n\n renderErrorDot() {\n if (this.props.required || this.props.hasError) {\n return (\n <View\n style={[\n styles.errorDot,\n { backgroundColor: this.props.colourBrandingMain },\n !this.isValid() && styles.errorError,\n this.isValid() && styles.errorValid,\n this.props.errorDotStyle,\n ]}\n />\n );\n }\n return null;\n }\n\n renderLabel() {\n if (_.isEmpty(this.props.label)) {\n return null;\n }\n return (\n <View style={styles.labelContainer}>\n <Text\n style={[\n styles.labelText,\n this.state.focused && { color: this.props.colourBrandingMain },\n !this.isValid() && !_.isEmpty(this.props.textValue) && styles.labelError,\n this.props.labelStyle,\n ]}\n >\n {this.props.label}\n </Text>\n {this.renderErrorDot()}\n </View>\n );\n }\n\n renderInput() {\n return (\n <View style={{ flexDirection: 'row' }}>\n <View style={{ flex: 1 }}>\n <TextInput\n value={this.props.textValue}\n onChangeText={this.props.onChangeText}\n keyboardType={this.props.keyboardType}\n /* Main Styling Props */\n selectionColor={this.props.colourBrandingDark}\n placeholder={this.props.placeholder}\n placeholderTextColor={this.props.placeholderTextColor || TEXT_LIGHTER}\n style={[\n styles.inputStyle,\n {\n textAlignVertical: this.props.autoGrow ? 'top' : 'center',\n color: this.props.textColour || TEXT_DARK,\n minHeight: this.props.minHeight || 20,\n },\n this.props.textStyle,\n ]}\n underlineColorAndroid={'rgba(0,0,0,0)'}\n /* Other Props */\n autoFocus={_.isUndefined(this.props.autoFocus) ? false : this.props.autoFocus}\n editable={_.isUndefined(this.props.editable) ? true : this.props.editable}\n secureTextEntry={_.isUndefined(this.props.secureTextEntry) ? false : this.showSecure()}\n autoCorrect={_.isUndefined(this.props.autoCorrect) ? false : this.props.autoCorrect}\n multiline={_.isUndefined(this.props.multiline) ? false : this.props.multiline}\n autoGrow={_.isUndefined(this.props.autoGrow) ? false : this.props.autoGrow}\n autoCapitalize={_.isUndefined(this.props.autoCapitalize) ? 'sentences' : this.props.autoCapitalize}\n onContentSizeChange={this.onGrow.bind(this)}\n /* Focus Props */\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n />\n </View>\n {!_.isUndefined(this.props.secureTextToggle) && this.props.secureTextToggle && (\n <TouchableOpacity onPress={this.toggleSecure.bind(this)}>\n {/* <Icon\n name={this.state.isSecure ? 'eye' : 'eye-slash'}\n type='font-awesome'\n iconStyle={{ fontSize: 16, color: TEXT_MID, paddingLeft: 16 }}\n /> */}\n <Pl60Icon\n name={this.state.isSecure ? 'show' : 'hide'}\n style={{ fontSize: 21, lineHeight: 20, color: TEXT_LIGHT, paddingLeft: 16 }}\n />\n </TouchableOpacity>\n )}\n </View>\n );\n }\n\n renderContent() {\n if (this.props.hasContent) {\n return this.props.children;\n }\n if (this.props.pointerEvents) {\n return <View pointerEvents={this.props.pointerEvents}>{this.renderInput()}</View>;\n }\n return this.renderInput();\n }\n\n render() {\n return (\n <View>\n <View\n style={[\n styles.sectionItem,\n this.props.hasUnderline && styles.sectionItemUnderline,\n this.state.focused && styles.inputFocus,\n this.state.focused && { borderBottomColor: this.props.colourBrandingMain },\n !this.isValid() && !_.isEmpty(this.props.textValue) && styles.inputError,\n !_.isUndefined(this.props.showError) && this.props.showError === true && !this.isValid() && styles.inputError,\n this.props.sectionStyle,\n ]}\n >\n {this.renderLabel()}\n <View>{this.renderContent()}</View>\n </View>\n {!_.isUndefined(this.props.showError) && this.props.showError === true && !this.isValid() && (\n <Text style={styles.errorText}>{this.props.errorText}</Text>\n )}\n </View>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n sectionItem: {\n paddingVertical: 16,\n paddingHorizontal: 8,\n borderBottomColor: LINEGREY,\n },\n sectionItemUnderline: {\n borderBottomWidth: 1,\n },\n inputFocus: {\n borderBottomWidth: 1,\n },\n inputError: {\n borderBottomWidth: 1,\n borderBottomColor: COLOUR_GRAPEFRUIT,\n },\n labelContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n marginBottom: 6,\n },\n labelText: {\n fontFamily: 'sf-regular',\n fontSize: 13,\n color: TEXT_LIGHT,\n },\n labelError: {\n color: COLOUR_GRAPEFRUIT,\n },\n errorDot: {\n height: 6,\n width: 6,\n borderRadius: 3,\n marginLeft: 8,\n marginBottom: 3,\n },\n errorError: {\n backgroundColor: COLOUR_GRAPEFRUIT,\n },\n errorValid: {\n backgroundColor: COLOUR_GREEN,\n },\n inputStyle: {\n fontFamily: 'sf-regular',\n fontSize: 17,\n margin: 0,\n padding: 0,\n },\n errorText: {\n paddingTop: 8,\n fontSize: 13,\n fontFamily: 'sf-regular',\n color: COLOUR_GRAPEFRUIT,\n },\n});\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: getMainBrandingColourFromState(state),\n colourBrandingDark: getDarkBrandingColourFromState(state),\n };\n};\n\nconst formCardSection = connect(mapStateToProps, {})(FormCardSection);\nexport { formCardSection as FormCardSection };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAClF,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,QAAQ,QAAQ,UAAU;AACnC,SACEC,YAAY,EACZC,SAAS,EACTC,YAAY,EACZC,QAAQ,EACRC,UAAU,EACVC,iBAAiB,EACjBC,8BAA8B,EAC9BC,8BAA8B,QACzB,YAAY;AACnB,SAASC,iBAAiB,QAAQ,WAAW;AAE7C,MAAMC,eAAe,SAASlB,SAAS,CAAC;EACtCmB,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZ,IAAI,CAACC,KAAK,GAAG;MACXC,MAAM,EAAEL,iBAAiB,CAAC,IAAI,CAACG,KAAK,CAACG,SAAS,EAAE,EAAE,CAAC;MACnDC,OAAO,EAAE,KAAK;MACdC,QAAQ,EAAE;IACZ,CAAC;EACH;EAEAC,OAAOA,CAAA,EAAG;IACR,IAAI,CAACC,QAAQ,CAAC;MAAEH,OAAO,EAAE;IAAK,CAAC,CAAC;IAChC,IAAI,IAAI,CA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,MAAM,EAAE,CAAC;IACT0F,KAAK,EAAE,CAAC;IACRC,YAAY,EAAE,CAAC;IACfC,UAAU,EAAE,CAAC;IACbJ,YAAY,EAAE;EAChB,CAAC;EACDzD,UAAU,EAAE;IACVF,eAAe,EAAErC;EACnB,CAAC;EACDwC,UAAU,EAAE;IACVH,eAAe,EAAExC;EACnB,CAAC;EACD8D,UAAU,EAAE;IACVsC,UAAU,EAAE,YAAY;IACxBvB,QAAQ,EAAE,EAAE;IACZ2B,MAAM,EAAE,CAAC;IACTC,OAAO,EAAE;EACX,CAAC;EACDZ,SAAS,EAAE;IACTa,UAAU,EAAE,CAAC;IACb7B,QAAQ,EAAE,EAAE;IACZuB,UAAU,EAAE,YAAY;IACxBnD,KAAK,EAAE9C;EACT;AACF,CAAC,CAAC;AAEF,MAAMwG,eAAe,GAAGjG,KAAK,IAAI;EAC/B,OAAO;IACL+B,kBAAkB,EAAErC,8BAA8B,CAACM,KAAK,CAAC;IACzDiD,kBAAkB,EAAEtD,8BAA8B,CAACK,KAAK;EAC1D,CAAC;AACH,CAAC;AAED,MAAMkG,eAAe,GAAGhH,OAAO,CAAC+G,eAAe,EAAE,CAAC,CAAC,CAAC,CAACpG,eAAe,CAAC;AACrE,SAASqG,eAAe,IAAIrG,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Component","Text","_","View","TextInput","TouchableOpacity","StyleSheet","connect","TEXT_LIGHTER","TEXT_DARK","COLOUR_GREEN","LINEGREY","TEXT_LIGHT","COLOUR_GRAPEFRUIT","getMainBrandingColourFromState","getDarkBrandingColourFromState","getValueOrDefault","FontAwesome","FormCardSection","constructor","props","state","height","minHeight","focused","isSecure","onFocus","setState","onBlur","onGrow","event","Math","max","nativeEvent","contentSize","toggleSecure","current","showSecure","isUndefined","secureTextToggle","secureTextEntry","isValid","required","isEmpty","textValue","renderErrorDot","hasError","createElement","style","styles","errorDot","backgroundColor","colourBrandingMain","errorError","errorValid","errorDotStyle","renderLabel","label","labelContainer","labelText","color","labelError","labelStyle","renderInput","flexDirection","flex","maxFontSizeMultiplier","value","onChangeText","keyboardType","selectionColor","colourBrandingDark","placeholder","placeholderTextColor","inputStyle","textAlignVertical","autoGrow","textColour","textStyle","underlineColorAndroid","autoFocus","editable","autoCorrect","multiline","autoCapitalize","onContentSizeChange","bind","onPress","name","fontSize","lineHeight","paddingLeft","renderContent","hasContent","children","pointerEvents","render","sectionItem","hasUnderline","sectionItemUnderline","inputFocus","borderBottomColor","inputError","showError","sectionStyle","errorText","create","paddingVertical","paddingHorizontal","borderBottomWidth","alignItems","marginBottom","fontFamily","width","borderRadius","marginLeft","margin","padding","paddingTop","mapStateToProps","formCardSection"],"sources":["FormCardSection.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport { Text } from \"@plusscommunities/pluss-core-app/components\";\nimport _ from \"lodash\";\nimport { View, TextInput, TouchableOpacity, StyleSheet } from \"react-native\";\nimport { connect } from \"react-redux\";\nimport {\n\tTEXT_LIGHTER,\n\tTEXT_DARK,\n\tCOLOUR_GREEN,\n\tLINEGREY,\n\tTEXT_LIGHT,\n\tCOLOUR_GRAPEFRUIT,\n\tgetMainBrandingColourFromState,\n\tgetDarkBrandingColourFromState,\n} from \"../colours\";\nimport { getValueOrDefault } from \"../helper\";\nimport { FontAwesome } from \"./Icon\";\n\nclass FormCardSection extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\theight: getValueOrDefault(this.props.minHeight, 20),\n\t\t\tfocused: false,\n\t\t\tisSecure: true,\n\t\t};\n\t}\n\n\tonFocus() {\n\t\tthis.setState({ focused: true });\n\t\tif (this.props.onFocus) {\n\t\t\tthis.props.onFocus();\n\t\t}\n\t}\n\n\tonBlur() {\n\t\tthis.setState({ focused: false });\n\t\tif (this.props.onBlur) {\n\t\t\tthis.props.onBlur();\n\t\t}\n\t}\n\n\tonGrow(event) {\n\t\tthis.setState({\n\t\t\theight: Math.max(\n\t\t\t\tevent.nativeEvent.contentSize.height,\n\t\t\t\tthis.props.minHeight,\n\t\t\t),\n\t\t});\n\t}\n\n\ttoggleSecure() {\n\t\tconst current = this.state.isSecure;\n\t\tthis.setState({ isSecure: !current });\n\t}\n\n\tshowSecure() {\n\t\tif (\n\t\t\t!_.isUndefined(this.props.secureTextToggle) &&\n\t\t\tthis.props.secureTextToggle\n\t\t) {\n\t\t\treturn this.state.isSecure;\n\t\t}\n\t\treturn this.props.secureTextEntry;\n\t}\n\n\tisValid() {\n\t\tif (this.props.required && _.isEmpty(this.props.textValue)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this.props.isValid && !this.props.isValid()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\trenderErrorDot() {\n\t\tif (this.props.required || this.props.hasError) {\n\t\t\treturn (\n\t\t\t\t<View\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\tstyles.errorDot,\n\t\t\t\t\t\t{ backgroundColor: this.props.colourBrandingMain },\n\t\t\t\t\t\t!this.isValid() && styles.errorError,\n\t\t\t\t\t\tthis.isValid() && styles.errorValid,\n\t\t\t\t\t\tthis.props.errorDotStyle,\n\t\t\t\t\t]}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\trenderLabel() {\n\t\tif (_.isEmpty(this.props.label)) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={styles.labelContainer}>\n\t\t\t\t<Text\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\tstyles.labelText,\n\t\t\t\t\t\tthis.state.focused && { color: this.props.colourBrandingMain },\n\t\t\t\t\t\t!this.isValid() &&\n\t\t\t\t\t\t\t!_.isEmpty(this.props.textValue) &&\n\t\t\t\t\t\t\tstyles.labelError,\n\t\t\t\t\t\tthis.props.labelStyle,\n\t\t\t\t\t]}\n\t\t\t\t>\n\t\t\t\t\t{this.props.label}\n\t\t\t\t</Text>\n\t\t\t\t{this.renderErrorDot()}\n\t\t\t</View>\n\t\t);\n\t}\n\n\trenderInput() {\n\t\treturn (\n\t\t\t<View style={{ flexDirection: \"row\" }}>\n\t\t\t\t<View style={{ flex: 1 }}>\n\t\t\t\t\t<TextInput\n\t\t\t\t\t\tmaxFontSizeMultiplier={1.2}\n\t\t\t\t\t\tvalue={this.props.textValue}\n\t\t\t\t\t\tonChangeText={this.props.onChangeText}\n\t\t\t\t\t\tkeyboardType={this.props.keyboardType}\n\t\t\t\t\t\t/* Main Styling Props */\n\t\t\t\t\t\tselectionColor={this.props.colourBrandingDark}\n\t\t\t\t\t\tplaceholder={this.props.placeholder}\n\t\t\t\t\t\tplaceholderTextColor={\n\t\t\t\t\t\t\tthis.props.placeholderTextColor || TEXT_LIGHTER\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\tstyles.inputStyle,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttextAlignVertical: this.props.autoGrow ? \"top\" : \"center\",\n\t\t\t\t\t\t\t\tcolor: this.props.textColour || TEXT_DARK,\n\t\t\t\t\t\t\t\tminHeight: this.props.minHeight || 20,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tthis.props.textStyle,\n\t\t\t\t\t\t]}\n\t\t\t\t\t\tunderlineColorAndroid={\"rgba(0,0,0,0)\"}\n\t\t\t\t\t\t/* Other Props */\n\t\t\t\t\t\tautoFocus={\n\t\t\t\t\t\t\t_.isUndefined(this.props.autoFocus) ? false : this.props.autoFocus\n\t\t\t\t\t\t}\n\t\t\t\t\t\teditable={\n\t\t\t\t\t\t\t_.isUndefined(this.props.editable) ? true : this.props.editable\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsecureTextEntry={\n\t\t\t\t\t\t\t_.isUndefined(this.props.secureTextEntry)\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: this.showSecure()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tautoCorrect={\n\t\t\t\t\t\t\t_.isUndefined(this.props.autoCorrect)\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: this.props.autoCorrect\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmultiline={\n\t\t\t\t\t\t\t_.isUndefined(this.props.multiline) ? false : this.props.multiline\n\t\t\t\t\t\t}\n\t\t\t\t\t\tautoGrow={\n\t\t\t\t\t\t\t_.isUndefined(this.props.autoGrow) ? false : this.props.autoGrow\n\t\t\t\t\t\t}\n\t\t\t\t\t\tautoCapitalize={\n\t\t\t\t\t\t\t_.isUndefined(this.props.autoCapitalize)\n\t\t\t\t\t\t\t\t? \"sentences\"\n\t\t\t\t\t\t\t\t: this.props.autoCapitalize\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonContentSizeChange={this.onGrow.bind(this)}\n\t\t\t\t\t\t/* Focus Props */\n\t\t\t\t\t\tonFocus={this.onFocus.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlur.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t\t{!_.isUndefined(this.props.secureTextToggle) &&\n\t\t\t\t\tthis.props.secureTextToggle && (\n\t\t\t\t\t\t<TouchableOpacity onPress={this.toggleSecure.bind(this)}>\n\t\t\t\t\t\t\t{/* <Icon\n name={this.state.isSecure ? 'eye' : 'eye-slash'}\n type='font-awesome'\n iconStyle={{ fontSize: 16, color: TEXT_MID, paddingLeft: 16 }}\n /> */}\n\t\t\t\t\t\t\t<FontAwesome\n\t\t\t\t\t\t\t\tname={this.state.isSecure ? \"eye\" : \"eye-slash\"}\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tfontSize: 21,\n\t\t\t\t\t\t\t\t\tlineHeight: 20,\n\t\t\t\t\t\t\t\t\tcolor: TEXT_LIGHT,\n\t\t\t\t\t\t\t\t\tpaddingLeft: 16,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t)}\n\t\t\t</View>\n\t\t);\n\t}\n\n\trenderContent() {\n\t\tif (this.props.hasContent) {\n\t\t\treturn this.props.children;\n\t\t}\n\t\tif (this.props.pointerEvents) {\n\t\t\treturn (\n\t\t\t\t<View pointerEvents={this.props.pointerEvents}>\n\t\t\t\t\t{this.renderInput()}\n\t\t\t\t</View>\n\t\t\t);\n\t\t}\n\t\treturn this.renderInput();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<View>\n\t\t\t\t<View\n\t\t\t\t\tstyle={[\n\t\t\t\t\t\tstyles.sectionItem,\n\t\t\t\t\t\tthis.props.hasUnderline && styles.sectionItemUnderline,\n\t\t\t\t\t\tthis.state.focused && styles.inputFocus,\n\t\t\t\t\t\tthis.state.focused && {\n\t\t\t\t\t\t\tborderBottomColor: this.props.colourBrandingMain,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t!this.isValid() &&\n\t\t\t\t\t\t\t!_.isEmpty(this.props.textValue) &&\n\t\t\t\t\t\t\tstyles.inputError,\n\t\t\t\t\t\t!_.isUndefined(this.props.showError) &&\n\t\t\t\t\t\t\tthis.props.showError === true &&\n\t\t\t\t\t\t\t!this.isValid() &&\n\t\t\t\t\t\t\tstyles.inputError,\n\t\t\t\t\t\tthis.props.sectionStyle,\n\t\t\t\t\t]}\n\t\t\t\t>\n\t\t\t\t\t{this.renderLabel()}\n\t\t\t\t\t<View>{this.renderContent()}</View>\n\t\t\t\t</View>\n\t\t\t\t{!_.isUndefined(this.props.showError) &&\n\t\t\t\t\tthis.props.showError === true &&\n\t\t\t\t\t!this.isValid() && (\n\t\t\t\t\t\t<Text style={styles.errorText}>{this.props.errorText}</Text>\n\t\t\t\t\t)}\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = StyleSheet.create({\n\tsectionItem: {\n\t\tpaddingVertical: 16,\n\t\tpaddingHorizontal: 8,\n\t\tborderBottomColor: LINEGREY,\n\t},\n\tsectionItemUnderline: {\n\t\tborderBottomWidth: 1,\n\t},\n\tinputFocus: {\n\t\tborderBottomWidth: 1,\n\t},\n\tinputError: {\n\t\tborderBottomWidth: 1,\n\t\tborderBottomColor: COLOUR_GRAPEFRUIT,\n\t},\n\tlabelContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tmarginBottom: 6,\n\t},\n\tlabelText: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 13,\n\t\tcolor: TEXT_LIGHT,\n\t},\n\tlabelError: {\n\t\tcolor: COLOUR_GRAPEFRUIT,\n\t},\n\terrorDot: {\n\t\theight: 6,\n\t\twidth: 6,\n\t\tborderRadius: 3,\n\t\tmarginLeft: 8,\n\t\tmarginBottom: 3,\n\t},\n\terrorError: {\n\t\tbackgroundColor: COLOUR_GRAPEFRUIT,\n\t},\n\terrorValid: {\n\t\tbackgroundColor: COLOUR_GREEN,\n\t},\n\tinputStyle: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 17,\n\t\tmargin: 0,\n\t\tpadding: 0,\n\t},\n\terrorText: {\n\t\tpaddingTop: 8,\n\t\tfontSize: 13,\n\t\tfontFamily: \"sf-regular\",\n\t\tcolor: COLOUR_GRAPEFRUIT,\n\t},\n});\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t\tcolourBrandingDark: getDarkBrandingColourFromState(state),\n\t};\n};\n\nconst formCardSection = connect(mapStateToProps, {})(FormCardSection);\nexport { formCardSection as FormCardSection };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,QAAQ,6CAA6C;AAClE,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,IAAI,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAC5E,SAASC,OAAO,QAAQ,aAAa;AACrC,SACCC,YAAY,EACZC,SAAS,EACTC,YAAY,EACZC,QAAQ,EACRC,UAAU,EACVC,iBAAiB,EACjBC,8BAA8B,EAC9BC,8BAA8B,QACxB,YAA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
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { PureComponent } from
|
|
2
|
-
import { View,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import React, { PureComponent } from "react";
|
|
2
|
+
import { View, TouchableOpacity } from "react-native";
|
|
3
|
+
import { Text } from "./Text";
|
|
4
|
+
import { Icon } from "@rneui/themed";
|
|
5
|
+
import { connect } from "react-redux";
|
|
6
|
+
import { TEXT_DARK, TEXT_LIGHT, getMainBrandingColourFromState } from "../colours";
|
|
7
|
+
import { FormCardSection } from "./FormCardSection";
|
|
7
8
|
class FormCardSectionOptionLauncher extends PureComponent {
|
|
8
9
|
render() {
|
|
9
10
|
const {
|
|
@@ -33,7 +34,7 @@ class FormCardSectionOptionLauncher extends PureComponent {
|
|
|
33
34
|
marginRight: 16
|
|
34
35
|
}]
|
|
35
36
|
}, value), /*#__PURE__*/React.createElement(Icon, {
|
|
36
|
-
name: icon ? icon :
|
|
37
|
+
name: icon ? icon : "angle-right",
|
|
37
38
|
type: "font-awesome",
|
|
38
39
|
iconStyle: [styles.text, {
|
|
39
40
|
fontSize: 20,
|
|
@@ -46,17 +47,17 @@ class FormCardSectionOptionLauncher extends PureComponent {
|
|
|
46
47
|
}
|
|
47
48
|
const styles = {
|
|
48
49
|
container: {
|
|
49
|
-
flexDirection:
|
|
50
|
-
alignSelf:
|
|
51
|
-
alignItems:
|
|
50
|
+
flexDirection: "row",
|
|
51
|
+
alignSelf: "stretch",
|
|
52
|
+
alignItems: "center"
|
|
52
53
|
},
|
|
53
54
|
text: {
|
|
54
|
-
fontFamily:
|
|
55
|
+
fontFamily: "sf-regular",
|
|
55
56
|
fontSize: 17,
|
|
56
57
|
color: TEXT_DARK
|
|
57
58
|
},
|
|
58
59
|
description: {
|
|
59
|
-
fontFamily:
|
|
60
|
+
fontFamily: "sf-regular",
|
|
60
61
|
fontSize: 15,
|
|
61
62
|
color: TEXT_LIGHT,
|
|
62
63
|
marginTop: 8
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","View","
|
|
1
|
+
{"version":3,"names":["React","PureComponent","View","TouchableOpacity","Text","Icon","connect","TEXT_DARK","TEXT_LIGHT","getMainBrandingColourFromState","FormCardSection","FormCardSectionOptionLauncher","render","onPress","sectionStyle","textStyle","title","description","value","icon","colourBrandingMain","props","createElement","hasContent","style","styles","container","text","marginRight","flex","name","type","iconStyle","fontSize","color","flexDirection","alignSelf","alignItems","fontFamily","marginTop","mapStateToProps","state","formCardSectionOptionLauncher"],"sources":["FormCardSectionOptionLauncher.js"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport { View, TouchableOpacity } from \"react-native\";\nimport { Text } from \"./Text\";\nimport { Icon } from \"@rneui/themed\";\nimport { connect } from \"react-redux\";\nimport {\n\tTEXT_DARK,\n\tTEXT_LIGHT,\n\tgetMainBrandingColourFromState,\n} from \"../colours\";\nimport { FormCardSection } from \"./FormCardSection\";\n\nclass FormCardSectionOptionLauncher extends PureComponent {\n\trender() {\n\t\tconst {\n\t\t\tonPress,\n\t\t\tsectionStyle,\n\t\t\ttextStyle,\n\t\t\ttitle,\n\t\t\tdescription,\n\t\t\tvalue,\n\t\t\ticon,\n\t\t\tcolourBrandingMain,\n\t\t} = this.props;\n\n\t\treturn (\n\t\t\t<TouchableOpacity onPress={onPress}>\n\t\t\t\t<FormCardSection hasContent sectionStyle={sectionStyle}>\n\t\t\t\t\t<View style={styles.container}>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tstyle={[styles.text, { marginRight: 16, flex: 1 }, textStyle]}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text style={[styles.text, { marginRight: 16 }]}>{value}</Text>\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tname={icon ? icon : \"angle-right\"}\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\tstyles.text,\n\t\t\t\t\t\t\t\t{ fontSize: 20, color: colourBrandingMain },\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t\t{description ? (\n\t\t\t\t\t\t<Text style={styles.description}>{description}</Text>\n\t\t\t\t\t) : null}\n\t\t\t\t</FormCardSection>\n\t\t\t</TouchableOpacity>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tcontainer: {\n\t\tflexDirection: \"row\",\n\t\talignSelf: \"stretch\",\n\t\talignItems: \"center\",\n\t},\n\ttext: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 17,\n\t\tcolor: TEXT_DARK,\n\t},\n\tdescription: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 15,\n\t\tcolor: TEXT_LIGHT,\n\t\tmarginTop: 8,\n\t},\n};\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t};\n};\n\nconst formCardSectionOptionLauncher = connect(\n\tmapStateToProps,\n\t{},\n)(FormCardSectionOptionLauncher);\nexport { formCardSectionOptionLauncher as FormCardSectionOptionLauncher };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AACrD,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,OAAO,QAAQ,aAAa;AACrC,SACCC,SAAS,EACTC,UAAU,EACVC,8BAA8B,QACxB,YAAY;AACnB,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,MAAMC,6BAA6B,SAASV,aAAa,CAAC;EACzDW,MAAMA,CAAA,EAAG;IACR,MAAM;MACLC,OAAO;MACPC,YAAY;MACZC,SAAS;MACTC,KAAK;MACLC,WAAW;MACXC,KAAK;MACLC,IAAI;MACJC;IACD,CAAC,GAAG,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ZqB,UAAU,EAAE,YAAY;IACxBL,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE1B,UAAU;IACjB+B,SAAS,EAAE;EACZ;AACD,CAAC;AAED,MAAMC,eAAe,GAAIC,KAAK,IAAK;EAClC,OAAO;IACNrB,kBAAkB,EAAEX,8BAA8B,CAACgC,KAAK;EACzD,CAAC;AACF,CAAC;AAED,MAAMC,6BAA6B,GAAGpC,OAAO,CAC5CkC,eAAe,EACf,CAAC,CACF,CAAC,CAAC7B,6BAA6B,CAAC;AAChC,SAAS+B,6BAA6B,IAAI/B,6BAA6B","ignoreList":[]}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
import React, { Component } from
|
|
5
|
-
import { Linking } from
|
|
6
|
-
import { connect } from
|
|
7
|
-
import ParsedText from
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import React, { Component } from "react";
|
|
5
|
+
import { Linking } from "react-native";
|
|
6
|
+
import { connect } from "react-redux";
|
|
7
|
+
import ParsedText from "react-native-parsed-text";
|
|
8
|
+
import { Text } from "./Text";
|
|
9
|
+
import { getMainBrandingColourFromState, TEXT_DARKEST } from "../colours";
|
|
10
|
+
import { getValidUrl } from "../helper";
|
|
11
|
+
import { analyticsActions } from "../apis";
|
|
11
12
|
class FormattedText extends Component {
|
|
12
13
|
constructor(...args) {
|
|
13
14
|
super(...args);
|
|
14
15
|
_defineProperty(this, "onPressUrl", url => {
|
|
15
16
|
const urlToUse = getValidUrl(url);
|
|
16
17
|
Linking.openURL(urlToUse);
|
|
17
|
-
this.checkLog(
|
|
18
|
+
this.checkLog("UrlClick", urlToUse);
|
|
18
19
|
});
|
|
19
20
|
_defineProperty(this, "onPressUrlText", urlText => {
|
|
20
21
|
const texts = urlText.match(FormattedText.UrlTextRegex);
|
|
@@ -22,12 +23,12 @@ class FormattedText extends Component {
|
|
|
22
23
|
});
|
|
23
24
|
_defineProperty(this, "onPressEmail", email => {
|
|
24
25
|
Linking.openURL(`mailto:${email}`);
|
|
25
|
-
this.checkLog(
|
|
26
|
+
this.checkLog("EmailClick", email);
|
|
26
27
|
});
|
|
27
28
|
_defineProperty(this, "onPressPhone", phone => {
|
|
28
|
-
const parsedPhone = phone.replace(/\D/g,
|
|
29
|
-
Linking.openURL(`tel:${parsedPhone.replace(/\D/g,
|
|
30
|
-
this.checkLog(
|
|
29
|
+
const parsedPhone = phone.replace(/\D/g, "");
|
|
30
|
+
Linking.openURL(`tel:${parsedPhone.replace(/\D/g, "")}`);
|
|
31
|
+
this.checkLog("PhoneClick", parsedPhone);
|
|
31
32
|
});
|
|
32
33
|
_defineProperty(this, "ifEnabled", value => this.props.disabled ? undefined : value);
|
|
33
34
|
}
|
|
@@ -57,6 +58,7 @@ class FormattedText extends Component {
|
|
|
57
58
|
children
|
|
58
59
|
} = this.props;
|
|
59
60
|
return /*#__PURE__*/React.createElement(ParsedText, {
|
|
61
|
+
maxFontSizeMultiplier: 1.2,
|
|
60
62
|
style: [styles.text, this.ifEnabled({
|
|
61
63
|
lineHeight: 24
|
|
62
64
|
}), style],
|
|
@@ -64,7 +66,7 @@ class FormattedText extends Component {
|
|
|
64
66
|
parse: [{
|
|
65
67
|
pattern: /\*\*(.*?)\*\*/i,
|
|
66
68
|
style: this.ifEnabled({
|
|
67
|
-
fontFamily:
|
|
69
|
+
fontFamily: "sf-bold",
|
|
68
70
|
lineHeight: 24
|
|
69
71
|
}),
|
|
70
72
|
renderText: this.renderTextContent
|
|
@@ -73,7 +75,7 @@ class FormattedText extends Component {
|
|
|
73
75
|
style: this.ifEnabled({
|
|
74
76
|
fontSize: titleSize || 22,
|
|
75
77
|
color: colourBrandingMain,
|
|
76
|
-
fontFamily:
|
|
78
|
+
fontFamily: "sf-semibold",
|
|
77
79
|
lineHeight: 24
|
|
78
80
|
}),
|
|
79
81
|
renderText: this.renderTextContent
|
|
@@ -82,7 +84,7 @@ class FormattedText extends Component {
|
|
|
82
84
|
style: this.ifEnabled({
|
|
83
85
|
fontSize: subtitleSize || 18,
|
|
84
86
|
color: TEXT_DARKEST,
|
|
85
|
-
fontFamily:
|
|
87
|
+
fontFamily: "sf-semibold",
|
|
86
88
|
lineHeight: 24
|
|
87
89
|
}),
|
|
88
90
|
renderText: this.renderTextContent
|
|
@@ -119,7 +121,7 @@ const styles = {
|
|
|
119
121
|
text: {
|
|
120
122
|
color: TEXT_DARKEST,
|
|
121
123
|
fontSize: 14,
|
|
122
|
-
fontFamily:
|
|
124
|
+
fontFamily: "sf-regular"
|
|
123
125
|
}
|
|
124
126
|
};
|
|
125
127
|
const mapStateToProps = state => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","Linking","connect","ParsedText","getMainBrandingColourFromState","TEXT_DARKEST","getValidUrl","analyticsActions","FormattedText","constructor","args","_defineProperty","url","urlToUse","openURL","checkLog","urlText","texts","match","UrlTextRegex","onPressUrl","email","phone","parsedPhone","replace","value","props","disabled","undefined","type","target","logClicks","log","site","entityType","entityId","renderTextContent","matchingString","matches","renderUrlText","render","style","numberOfLines","titleSize","colourBrandingMain","subtitleSize","children","createElement","styles","text","ifEnabled","lineHeight","parse","pattern","fontFamily","renderText","fontSize","color","onPress","onPressUrlText","onPressEmail","onPressPhone","mapStateToProps","state"],"sources":["FormattedText.js"],"sourcesContent":["import React, { Component } from
|
|
1
|
+
{"version":3,"names":["React","Component","Linking","connect","ParsedText","Text","getMainBrandingColourFromState","TEXT_DARKEST","getValidUrl","analyticsActions","FormattedText","constructor","args","_defineProperty","url","urlToUse","openURL","checkLog","urlText","texts","match","UrlTextRegex","onPressUrl","email","phone","parsedPhone","replace","value","props","disabled","undefined","type","target","logClicks","log","site","entityType","entityId","renderTextContent","matchingString","matches","renderUrlText","render","style","numberOfLines","titleSize","colourBrandingMain","subtitleSize","children","createElement","maxFontSizeMultiplier","styles","text","ifEnabled","lineHeight","parse","pattern","fontFamily","renderText","fontSize","color","onPress","onPressUrlText","onPressEmail","onPressPhone","mapStateToProps","state"],"sources":["FormattedText.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport { Linking } from \"react-native\";\nimport { connect } from \"react-redux\";\nimport ParsedText from \"react-native-parsed-text\";\nimport { Text } from \"./Text\";\nimport { getMainBrandingColourFromState, TEXT_DARKEST } from \"../colours\";\nimport { getValidUrl } from \"../helper\";\nimport { analyticsActions } from \"../apis\";\n\nclass FormattedText extends Component {\n\tstatic get UrlTextRegex() {\n\t\treturn /\\[([^\\]\\|\\]]+)\\|([^\\]\\|\\]]+)\\]/i;\n\t}\n\n\tcheckLog(type, target) {\n\t\tif (this.props.logClicks) {\n\t\t\tanalyticsActions.log(\n\t\t\t\tthis.props.site,\n\t\t\t\ttype,\n\t\t\t\tthis.props.entityType,\n\t\t\t\tthis.props.entityId,\n\t\t\t\t{ target },\n\t\t\t);\n\t\t}\n\t}\n\n\tonPressUrl = (url) => {\n\t\tconst urlToUse = getValidUrl(url);\n\t\tLinking.openURL(urlToUse);\n\t\tthis.checkLog(\"UrlClick\", urlToUse);\n\t};\n\n\tonPressUrlText = (urlText) => {\n\t\tconst texts = urlText.match(FormattedText.UrlTextRegex);\n\t\tthis.onPressUrl(texts[1]);\n\t};\n\n\tonPressEmail = (email) => {\n\t\tLinking.openURL(`mailto:${email}`);\n\t\tthis.checkLog(\"EmailClick\", email);\n\t};\n\n\tonPressPhone = (phone) => {\n\t\tconst parsedPhone = phone.replace(/\\D/g, \"\");\n\t\tLinking.openURL(`tel:${parsedPhone.replace(/\\D/g, \"\")}`);\n\t\tthis.checkLog(\"PhoneClick\", parsedPhone);\n\t};\n\n\tifEnabled = (value) => (this.props.disabled ? undefined : value);\n\n\trenderTextContent(matchingString, matches) {\n\t\treturn matches[1];\n\t}\n\n\trenderUrlText(matchingString, matches) {\n\t\treturn matches[2];\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tstyle,\n\t\t\tnumberOfLines,\n\t\t\ttitleSize,\n\t\t\tcolourBrandingMain,\n\t\t\tsubtitleSize,\n\t\t\tchildren,\n\t\t} = this.props;\n\n\t\treturn (\n\t\t\t<ParsedText\n\t\t\t\tmaxFontSizeMultiplier={1.2}\n\t\t\t\tstyle={[styles.text, this.ifEnabled({ lineHeight: 24 }), style]}\n\t\t\t\tnumberOfLines={numberOfLines}\n\t\t\t\tparse={[\n\t\t\t\t\t{\n\t\t\t\t\t\tpattern: /\\*\\*(.*?)\\*\\*/i,\n\t\t\t\t\t\tstyle: this.ifEnabled({\n\t\t\t\t\t\t\tfontFamily: \"sf-bold\",\n\t\t\t\t\t\t\tlineHeight: 24,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\trenderText: this.renderTextContent,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpattern: /\\*t\\*(.*?)\\*t\\*/i,\n\t\t\t\t\t\tstyle: this.ifEnabled({\n\t\t\t\t\t\t\tfontSize: titleSize || 22,\n\t\t\t\t\t\t\tcolor: colourBrandingMain,\n\t\t\t\t\t\t\tfontFamily: \"sf-semibold\",\n\t\t\t\t\t\t\tlineHeight: 24,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\trenderText: this.renderTextContent,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpattern: /\\*s\\*(.*?)\\*s\\*/i,\n\t\t\t\t\t\tstyle: this.ifEnabled({\n\t\t\t\t\t\t\tfontSize: subtitleSize || 18,\n\t\t\t\t\t\t\tcolor: TEXT_DARKEST,\n\t\t\t\t\t\t\tfontFamily: \"sf-semibold\",\n\t\t\t\t\t\t\tlineHeight: 24,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\trenderText: this.renderTextContent,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpattern: FormattedText.UrlTextRegex,\n\t\t\t\t\t\tstyle: this.ifEnabled({ color: colourBrandingMain }),\n\t\t\t\t\t\tonPress: this.ifEnabled(this.onPressUrlText),\n\t\t\t\t\t\trenderText: this.renderUrlText,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpattern:\n\t\t\t\t\t\t\t/(?:(?:https?|ftp|file):\\/\\/|www\\.|ftp\\.)(?:\\([-A-Z0-9+&@#\\/%=~_|$?!:,.]*\\)|[-A-Z0-9+&@#\\/%=~_|$?!:,.])*(?:\\([-A-Z0-9+&@#\\/%=~_|$?!:,.]*\\)|[A-Z0-9+&@#\\/%=~_|$])/im,\n\t\t\t\t\t\tstyle: this.ifEnabled({ color: colourBrandingMain }),\n\t\t\t\t\t\tonPress: this.ifEnabled(this.onPressUrl),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpattern: /([A-Z0-9._%-]+)@([A-Z0-9.-]+\\.[A-Z]{2,4})/im,\n\t\t\t\t\t\tstyle: this.ifEnabled({ color: colourBrandingMain }),\n\t\t\t\t\t\tonPress: this.ifEnabled(this.onPressEmail),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpattern:\n\t\t\t\t\t\t\t/(?:\\+?(\\d{1,3}))?([-. (]*(\\d{1,3})[-. )]*)?((\\d{2,4})[-. ]*(\\d{2,4})(?:[-.x ]*(\\d+))?)\\s*$/im,\n\t\t\t\t\t\tstyle: this.ifEnabled({ color: colourBrandingMain }),\n\t\t\t\t\t\tonPress: this.ifEnabled(this.onPressPhone),\n\t\t\t\t\t},\n\t\t\t\t]}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</ParsedText>\n\t\t);\n\t}\n}\n\nconst styles = {\n\ttext: {\n\t\tcolor: TEXT_DARKEST,\n\t\tfontSize: 14,\n\t\tfontFamily: \"sf-regular\",\n\t},\n};\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: getMainBrandingColourFromState(state),\n\t};\n};\n\nexport default connect(mapStateToProps, {})(FormattedText);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,OAAO,QAAQ,aAAa;AACrC,OAAOC,UAAU,MAAM,0BAA0B;AACjD,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,8BAA8B,EAAEC,YAAY,QAAQ,YAAY;AACzE,SAASC,WAAW,QAAQ,WAAW;AACvC,SAASC,gBAAgB,QAAQ,SAAS;AAE1C,MAAMC,aAAa,SAAST,SAAS,CAAC;EAAAU,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBAiBvBC,GAAG,IAAK;MACrB,MAAMC,QAAQ,GAAGP,WAAW,CAACM,GAAG,CAAC;MACjCZ,OAAO,CAACc,OAAO,CAACD,QAAQ,CAAC;MACzB,IAAI,CAACE,QAAQ,CAAC,UAAU,EAAEF,QAAQ,CAAC;IACpC,CAAC;IAAAF,eAAA,yBAEiBK,OAAO,IAAK;MAC7B,MAAMC,KAAK,GAAGD,OAAO,CAACE,KAAK,CAACV,aAAa,CAACW,YAAY,CAAC;MACvD,IAAI,CAACC,UAAU,CAACH,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IAAAN,eAAA,uBAEeU,KAAK,IAAK;MACzBrB,OAAO,CAACc,OAAO,CAAC,UAAUO,KAAK,EAAE,CAAC;MAClC,IAAI,CAACN,QAAQ,CAAC,YAAY,EAAEM,KAAK,CAAC;IACnC,CAAC;IAAAV,eAAA,uBAEeW,KAAK,IAAK;MACzB,MAAMC,WAAW,GAAGD,K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