@plusscommunities/pluss-core-app 4.0.4-auth.0 → 6.0.0-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 +34 -0
- package/dist/module/actions/FollowerActions.js.map +1 -0
- package/dist/module/actions/MediaActions.js +29 -0
- package/dist/module/actions/MediaActions.js.map +1 -0
- package/dist/module/actions/ResidentActions.js +26 -0
- package/dist/module/actions/ResidentActions.js.map +1 -0
- package/dist/module/actions/UserActions.js +223 -0
- package/dist/module/actions/UserActions.js.map +1 -0
- package/dist/module/actions/UserSettingsActions.js +14 -0
- package/dist/module/actions/UserSettingsActions.js.map +1 -0
- package/dist/module/actions/index.js +6 -0
- package/dist/module/actions/index.js.map +1 -0
- package/dist/module/actions/types.js +17 -0
- package/dist/module/actions/types.js.map +1 -0
- package/dist/module/apis/analyticsActions.js +20 -0
- package/dist/module/apis/analyticsActions.js.map +1 -0
- package/dist/module/apis/contactActions.js +27 -0
- package/dist/module/apis/contactActions.js.map +1 -0
- package/dist/module/apis/eventActions.js +161 -0
- package/dist/module/apis/eventActions.js.map +1 -0
- package/dist/module/apis/fileActions.js +86 -0
- package/dist/module/apis/fileActions.js.map +1 -0
- package/dist/module/apis/followerActions.js +38 -0
- package/dist/module/apis/followerActions.js.map +1 -0
- package/dist/module/apis/index.js +12 -0
- package/dist/module/apis/index.js.map +1 -0
- package/dist/module/apis/notificationActions.js +60 -0
- package/dist/module/apis/notificationActions.js.map +1 -0
- package/dist/module/apis/profileActions.js +14 -0
- package/dist/module/apis/profileActions.js.map +1 -0
- package/dist/module/apis/reactionActions.js +76 -0
- package/dist/module/apis/reactionActions.js.map +1 -0
- package/dist/module/apis/stringActions.js +30 -0
- package/dist/module/apis/stringActions.js.map +1 -0
- package/dist/module/apis/typeActions.js +15 -0
- package/dist/module/apis/typeActions.js.map +1 -0
- package/dist/module/apis/userActions.js +104 -0
- package/dist/module/apis/userActions.js.map +1 -0
- package/dist/module/assets/icons/reactions/heart.png +0 -0
- package/dist/module/assets/icons/reactions/party.png +0 -0
- package/dist/module/assets/icons/reactions/sad.png +0 -0
- package/dist/module/assets/icons/reactions/smile.png +0 -0
- package/dist/module/colours.js +168 -0
- package/dist/module/colours.js.map +1 -0
- package/dist/module/components/AddButton.js +43 -0
- package/dist/module/components/AddButton.js.map +1 -0
- package/dist/module/components/AddToCalendarButton.js +225 -0
- package/dist/module/components/AddToCalendarButton.js.map +1 -0
- package/dist/module/components/Attachment.js +54 -0
- package/dist/module/components/Attachment.js.map +1 -0
- package/dist/module/components/AudienceSelectorLauncher.js +64 -0
- package/dist/module/components/AudienceSelectorLauncher.js.map +1 -0
- package/dist/module/components/AudienceSelectorPage.js +350 -0
- package/dist/module/components/AudienceSelectorPage.js.map +1 -0
- package/dist/module/components/AutoOffsetImage.js +186 -0
- package/dist/module/components/AutoOffsetImage.js.map +1 -0
- package/dist/module/components/BackButton.js +58 -0
- package/dist/module/components/BackButton.js.map +1 -0
- package/dist/module/components/CategoryTabs.js +154 -0
- package/dist/module/components/CategoryTabs.js.map +1 -0
- package/dist/module/components/CommentReply.js +328 -0
- package/dist/module/components/CommentReply.js.map +1 -0
- package/dist/module/components/CommentSection.js +822 -0
- package/dist/module/components/CommentSection.js.map +1 -0
- package/dist/module/components/ConfirmPopup.js +108 -0
- package/dist/module/components/ConfirmPopup.js.map +1 -0
- package/dist/module/components/ConfirmationPopup.js +72 -0
- package/dist/module/components/ConfirmationPopup.js.map +1 -0
- package/dist/module/components/DropDownItem.js +74 -0
- package/dist/module/components/DropDownItem.js.map +1 -0
- package/dist/module/components/DropDownMenu.js +41 -0
- package/dist/module/components/DropDownMenu.js.map +1 -0
- package/dist/module/components/EmptyStateMain.js +50 -0
- package/dist/module/components/EmptyStateMain.js.map +1 -0
- package/dist/module/components/EmptyStateWidget.js +47 -0
- package/dist/module/components/EmptyStateWidget.js.map +1 -0
- package/dist/module/components/FontScaleButton.js +36 -0
- package/dist/module/components/FontScaleButton.js.map +1 -0
- package/dist/module/components/FontScalePopup.js +75 -0
- package/dist/module/components/FontScalePopup.js.map +1 -0
- package/dist/module/components/FormCard.js +25 -0
- package/dist/module/components/FormCard.js.map +1 -0
- package/dist/module/components/FormCardSection.js +212 -0
- package/dist/module/components/FormCardSection.js.map +1 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js +72 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -0
- package/dist/module/components/FormattedText.js +131 -0
- package/dist/module/components/FormattedText.js.map +1 -0
- package/dist/module/components/GenericInput.js +148 -0
- package/dist/module/components/GenericInput.js.map +1 -0
- package/dist/module/components/GenericInputSection.js +158 -0
- package/dist/module/components/GenericInputSection.js.map +1 -0
- package/dist/module/components/Header.js +458 -0
- package/dist/module/components/Header.js.map +1 -0
- package/dist/module/components/ImagePopup.js +240 -0
- package/dist/module/components/ImagePopup.js.map +1 -0
- package/dist/module/components/ImageUploadProgress.js +68 -0
- package/dist/module/components/ImageUploadProgress.js.map +1 -0
- package/dist/module/components/ImageUploader.js +795 -0
- package/dist/module/components/ImageUploader.js.map +1 -0
- package/dist/module/components/InlineButton.js +65 -0
- package/dist/module/components/InlineButton.js.map +1 -0
- package/dist/module/components/Input.js +154 -0
- package/dist/module/components/Input.js.map +1 -0
- package/dist/module/components/LoadingCircles.js +220 -0
- package/dist/module/components/LoadingCircles.js.map +1 -0
- package/dist/module/components/LoadingIndicator.js +86 -0
- package/dist/module/components/LoadingIndicator.js.map +1 -0
- package/dist/module/components/LoadingStateWidget.js +46 -0
- package/dist/module/components/LoadingStateWidget.js.map +1 -0
- package/dist/module/components/MediaPlayer.js +418 -0
- package/dist/module/components/MediaPlayer.js.map +1 -0
- package/dist/module/components/MiddlePopup.js +43 -0
- package/dist/module/components/MiddlePopup.js.map +1 -0
- package/dist/module/components/PDFPopup.js +191 -0
- package/dist/module/components/PDFPopup.js.map +1 -0
- package/dist/module/components/PlussChat.js +986 -0
- package/dist/module/components/PlussChat.js.map +1 -0
- package/dist/module/components/PlussChatMessage.js +262 -0
- package/dist/module/components/PlussChatMessage.js.map +1 -0
- package/dist/module/components/PlussChatTime.js +58 -0
- package/dist/module/components/PlussChatTime.js.map +1 -0
- package/dist/module/components/Popup.js +125 -0
- package/dist/module/components/Popup.js.map +1 -0
- package/dist/module/components/PopupMenu.js +119 -0
- package/dist/module/components/PopupMenu.js.map +1 -0
- package/dist/module/components/PositionedImage.js +313 -0
- package/dist/module/components/PositionedImage.js.map +1 -0
- package/dist/module/components/ProfilePic.js +106 -0
- package/dist/module/components/ProfilePic.js.map +1 -0
- package/dist/module/components/RadioButton.js +77 -0
- package/dist/module/components/RadioButton.js.map +1 -0
- package/dist/module/components/Reaction.js +116 -0
- package/dist/module/components/Reaction.js.map +1 -0
- package/dist/module/components/Reactions.js +71 -0
- package/dist/module/components/Reactions.js.map +1 -0
- package/dist/module/components/SharingTools.js +154 -0
- package/dist/module/components/SharingTools.js.map +1 -0
- package/dist/module/components/Spinner.js +22 -0
- package/dist/module/components/Spinner.js.map +1 -0
- package/dist/module/components/StickyFooter.js +34 -0
- package/dist/module/components/StickyFooter.js.map +1 -0
- package/dist/module/components/TextStyle.js +45 -0
- package/dist/module/components/TextStyle.js.map +1 -0
- package/dist/module/components/Toggle.js +65 -0
- package/dist/module/components/Toggle.js.map +1 -0
- package/dist/module/components/TouchableSearchBar.js +67 -0
- package/dist/module/components/TouchableSearchBar.js.map +1 -0
- package/dist/module/components/UserListPopup.js +135 -0
- package/dist/module/components/UserListPopup.js.map +1 -0
- package/dist/module/components/UserListing.js +267 -0
- package/dist/module/components/UserListing.js.map +1 -0
- package/dist/module/components/VideoPopup.js +113 -0
- package/dist/module/components/VideoPopup.js.map +1 -0
- package/dist/module/components/WarningPopup.js +82 -0
- package/dist/module/components/WarningPopup.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +289 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +116 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -0
- package/dist/module/components/index.js +55 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +385 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +387 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -0
- package/dist/module/config.js +32 -0
- package/dist/module/config.js.map +1 -0
- package/dist/module/constants.js +19 -0
- package/dist/module/constants.js.map +1 -0
- package/dist/module/fonts/index.js +2 -0
- package/dist/module/fonts/index.js.map +1 -0
- package/dist/module/fonts/pluss60-icons.js +5 -0
- package/dist/module/fonts/pluss60-icons.js.map +1 -0
- package/dist/module/fonts/pluss60-icons.json +1097 -0
- package/dist/module/helper.js +397 -0
- package/dist/module/helper.js.map +1 -0
- package/dist/module/index.js +13 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/js/images/detectFaces.js +30 -0
- package/dist/module/js/images/detectFaces.js.map +1 -0
- package/dist/module/js/images/findLandmarkRange.js +93 -0
- package/dist/module/js/images/findLandmarkRange.js.map +1 -0
- package/dist/module/js/images/getScaledOffset.js +81 -0
- package/dist/module/js/images/getScaledOffset.js.map +1 -0
- package/dist/module/js/site/getSiteLevelFromState.js +29 -0
- package/dist/module/js/site/getSiteLevelFromState.js.map +1 -0
- package/dist/module/js/site/isTVEnabled.js +10 -0
- package/dist/module/js/site/isTVEnabled.js.map +1 -0
- package/dist/module/session.js +58 -0
- package/dist/module/session.js.map +1 -0
- package/dist/module/styles.js +67 -0
- package/dist/module/styles.js.map +1 -0
- package/package.json +20 -24
- package/src/js/images/detectFaces.js +8 -4
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import { Text, View, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { connect } from 'react-redux';
|
|
4
|
+
import { getMainBrandingColourFromState } from '../colours';
|
|
5
|
+
class Toggle extends PureComponent {
|
|
6
|
+
render() {
|
|
7
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
8
|
+
style: [styles.container, this.props.style]
|
|
9
|
+
}, this.props.options.map((option, index) => {
|
|
10
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
11
|
+
onPress: () => {
|
|
12
|
+
this.props.onPress(option);
|
|
13
|
+
},
|
|
14
|
+
style: [styles.tag, {
|
|
15
|
+
borderColor: this.props.colourBrandingMain
|
|
16
|
+
}, option.val === this.props.activeVal && {
|
|
17
|
+
borderColor: this.props.colourBrandingMain,
|
|
18
|
+
backgroundColor: this.props.colourBrandingMain
|
|
19
|
+
}, index === 0 && styles.firstTag, index === this.props.options.length - 1 && styles.lastTag, this.props.tagStyle],
|
|
20
|
+
key: option.val
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
22
|
+
style: [styles.text, {
|
|
23
|
+
color: this.props.colourBrandingMain
|
|
24
|
+
}, option.val === this.props.activeVal && styles.activeText, this.props.textStyle]
|
|
25
|
+
}, option.text));
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const styles = {
|
|
30
|
+
container: {
|
|
31
|
+
flexDirection: 'row'
|
|
32
|
+
},
|
|
33
|
+
text: {
|
|
34
|
+
fontFamily: 'sf-semibold',
|
|
35
|
+
fontSize: 14,
|
|
36
|
+
textAlign: 'center'
|
|
37
|
+
},
|
|
38
|
+
activeText: {
|
|
39
|
+
color: '#fff'
|
|
40
|
+
},
|
|
41
|
+
tag: {
|
|
42
|
+
flex: 1,
|
|
43
|
+
height: 34,
|
|
44
|
+
borderWidth: 1,
|
|
45
|
+
borderLeftWidth: 0,
|
|
46
|
+
justifyContent: 'center'
|
|
47
|
+
},
|
|
48
|
+
firstTag: {
|
|
49
|
+
borderLeftWidth: 1,
|
|
50
|
+
borderTopLeftRadius: 4,
|
|
51
|
+
borderBottomLeftRadius: 4
|
|
52
|
+
},
|
|
53
|
+
lastTag: {
|
|
54
|
+
borderTopRightRadius: 4,
|
|
55
|
+
borderBottomRightRadius: 4
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const mapStateToProps = state => {
|
|
59
|
+
return {
|
|
60
|
+
colourBrandingMain: getMainBrandingColourFromState(state)
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const toggle = connect(mapStateToProps, {})(Toggle);
|
|
64
|
+
export { toggle as Toggle };
|
|
65
|
+
//# sourceMappingURL=Toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PureComponent","Text","View","TouchableOpacity","connect","getMainBrandingColourFromState","Toggle","render","createElement","style","styles","container","props","options","map","option","index","onPress","tag","borderColor","colourBrandingMain","val","activeVal","backgroundColor","firstTag","length","lastTag","tagStyle","key","text","color","activeText","textStyle","flexDirection","fontFamily","fontSize","textAlign","flex","height","borderWidth","borderLeftWidth","justifyContent","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","mapStateToProps","state","toggle"],"sources":["Toggle.js"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\nimport { connect } from 'react-redux';\nimport { getMainBrandingColourFromState } from '../colours';\n\nclass Toggle extends PureComponent {\n render() {\n return (\n <View style={[styles.container, this.props.style]}>\n {this.props.options.map((option, index) => {\n return (\n <TouchableOpacity\n onPress={() => {\n this.props.onPress(option);\n }}\n style={[\n styles.tag,\n { borderColor: this.props.colourBrandingMain },\n option.val === this.props.activeVal && {\n borderColor: this.props.colourBrandingMain,\n backgroundColor: this.props.colourBrandingMain,\n },\n index === 0 && styles.firstTag,\n index === this.props.options.length - 1 && styles.lastTag,\n this.props.tagStyle,\n ]}\n key={option.val}\n >\n <Text\n style={[\n styles.text,\n { color: this.props.colourBrandingMain },\n option.val === this.props.activeVal && styles.activeText,\n this.props.textStyle,\n ]}\n >\n {option.text}\n </Text>\n </TouchableOpacity>\n );\n })}\n </View>\n );\n }\n}\n\nconst styles = {\n container: {\n flexDirection: 'row',\n },\n text: {\n fontFamily: 'sf-semibold',\n fontSize: 14,\n textAlign: 'center',\n },\n activeText: {\n color: '#fff',\n },\n tag: {\n flex: 1,\n height: 34,\n borderWidth: 1,\n borderLeftWidth: 0,\n justifyContent: 'center',\n },\n firstTag: {\n borderLeftWidth: 1,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n lastTag: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n};\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: getMainBrandingColourFromState(state),\n };\n};\n\nconst toggle = connect(mapStateToProps, {})(Toggle);\nexport { toggle as Toggle };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAC3D,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,8BAA8B,QAAQ,YAAY;AAE3D,MAAMC,MAAM,SAASN,aAAa,CAAC;EACjCO,MAAMA,CAAA,EAAG;IACP,oBACER,KAAA,CAAAS,aAAA,CAACN,IAAI;MAACO,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAE,IAAI,CAACC,KAAK,CAACH,KAAK;IAAE,GAC/C,IAAI,CAACG,KAAK,CAACC,OAAO,CAACC,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,KAAK;MACzC,oBACEjB,KAAA,CAAAS,aAAA,CAACL,gBAAgB;QACfc,OAAO,EAAEA,CAAA,KAAM;UACb,IAAI,CAACL,KAAK,CAACK,OAAO,CAACF,MAAM,CAAC;QAC5B,CAAE;QACFN,KAAK,EAAE,CACLC,MAAM,CAACQ,GAAG,EACV;UAAEC,WAAW,EAAE,IAAI,CAACP,KAAK,CAACQ;QAAmB,CAAC,EAC9CL,MA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CAAC;EACDjB,OAAO,EAAE;IACPkB,oBAAoB,EAAE,CAAC;IACvBC,uBAAuB,EAAE;EAC3B;AACF,CAAC;AAED,MAAMC,eAAe,GAAGC,KAAK,IAAI;EAC/B,OAAO;IACL3B,kBAAkB,EAAEf,8BAA8B,CAAC0C,KAAK;EAC1D,CAAC;AACH,CAAC;AAED,MAAMC,MAAM,GAAG5C,OAAO,CAAC0C,eAAe,EAAE,CAAC,CAAC,CAAC,CAACxC,MAAM,CAAC;AACnD,SAAS0C,MAAM,IAAI1C,MAAM"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
import React, { Component } from 'react';
|
|
5
|
+
import { View, TouchableWithoutFeedback, Text } from 'react-native';
|
|
6
|
+
import { connect } from 'react-redux';
|
|
7
|
+
import { getSiteSettingFromState } from '../helper';
|
|
8
|
+
import { TEXT_LIGHT, BOXGREY } from '../colours';
|
|
9
|
+
import { Pl60Icon } from '../fonts';
|
|
10
|
+
import Config, { Services } from '../config';
|
|
11
|
+
class TouchableSearchBar extends Component {
|
|
12
|
+
constructor(...args) {
|
|
13
|
+
super(...args);
|
|
14
|
+
_defineProperty(this, "onPressSearch", () => {
|
|
15
|
+
Services.navigation.navigate('search', {
|
|
16
|
+
priorityType: this.props.priorityType,
|
|
17
|
+
searchName: this.props.searchName
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
|
23
|
+
onPress: this.onPressSearch
|
|
24
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
25
|
+
style: [styles.searchInputContainer, this.props.headerType !== 'white' && {
|
|
26
|
+
backgroundColor: '#fff'
|
|
27
|
+
}, this.props.style]
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Pl60Icon, {
|
|
29
|
+
name: "Ellipse",
|
|
30
|
+
style: styles.searchIcon
|
|
31
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
32
|
+
style: styles.searchText
|
|
33
|
+
}, `Search ${this.props.searchName}`)));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const styles = {
|
|
37
|
+
searchInputContainer: {
|
|
38
|
+
flex: 1,
|
|
39
|
+
height: 36,
|
|
40
|
+
marginHorizontal: 16,
|
|
41
|
+
marginVertical: 17,
|
|
42
|
+
borderRadius: 25,
|
|
43
|
+
backgroundColor: BOXGREY,
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
flexDirection: 'row',
|
|
47
|
+
paddingHorizontal: 16
|
|
48
|
+
},
|
|
49
|
+
searchIcon: {
|
|
50
|
+
fontSize: 14,
|
|
51
|
+
color: TEXT_LIGHT,
|
|
52
|
+
marginRight: 8
|
|
53
|
+
},
|
|
54
|
+
searchText: {
|
|
55
|
+
fontSize: 14,
|
|
56
|
+
color: TEXT_LIGHT,
|
|
57
|
+
fontFamily: 'sf-medium'
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const mapStateToProps = state => {
|
|
61
|
+
return {
|
|
62
|
+
headerType: getSiteSettingFromState(state, 'HeaderType', getSiteSettingFromState(state, 'UseGradientHeader', Config.env.hasGradientHeader) ? 'gradient' : 'white')
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const touchableSearchBar = connect(mapStateToProps, {})(TouchableSearchBar);
|
|
66
|
+
export { touchableSearchBar as TouchableSearchBar };
|
|
67
|
+
//# sourceMappingURL=TouchableSearchBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Component","View","TouchableWithoutFeedback","Text","connect","getSiteSettingFromState","TEXT_LIGHT","BOXGREY","Pl60Icon","Config","Services","TouchableSearchBar","constructor","args","_defineProperty","navigation","navigate","priorityType","props","searchName","render","createElement","onPress","onPressSearch","style","styles","searchInputContainer","headerType","backgroundColor","name","searchIcon","searchText","flex","height","marginHorizontal","marginVertical","borderRadius","alignItems","justifyContent","flexDirection","paddingHorizontal","fontSize","color","marginRight","fontFamily","mapStateToProps","state","env","hasGradientHeader","touchableSearchBar"],"sources":["TouchableSearchBar.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { View, TouchableWithoutFeedback, Text } from 'react-native';\nimport { connect } from 'react-redux';\nimport { getSiteSettingFromState } from '../helper';\nimport { TEXT_LIGHT, BOXGREY } from '../colours';\nimport { Pl60Icon } from '../fonts';\nimport Config, { Services } from '../config';\n\nclass TouchableSearchBar extends Component {\n onPressSearch = () => {\n Services.navigation.navigate('search', { priorityType: this.props.priorityType, searchName: this.props.searchName });\n };\n\n render() {\n return (\n <TouchableWithoutFeedback onPress={this.onPressSearch}>\n <View style={[styles.searchInputContainer, this.props.headerType !== 'white' && { backgroundColor: '#fff' }, this.props.style]}>\n <Pl60Icon name=\"Ellipse\" style={styles.searchIcon} />\n <Text style={styles.searchText}>{`Search ${this.props.searchName}`}</Text>\n </View>\n </TouchableWithoutFeedback>\n );\n }\n}\n\nconst styles = {\n searchInputContainer: {\n flex: 1,\n height: 36,\n marginHorizontal: 16,\n marginVertical: 17,\n borderRadius: 25,\n backgroundColor: BOXGREY,\n alignItems: 'center',\n justifyContent: 'center',\n flexDirection: 'row',\n paddingHorizontal: 16,\n },\n searchIcon: {\n fontSize: 14,\n color: TEXT_LIGHT,\n marginRight: 8,\n },\n searchText: {\n fontSize: 14,\n color: TEXT_LIGHT,\n fontFamily: 'sf-medium',\n },\n};\n\nconst mapStateToProps = state => {\n return {\n headerType: getSiteSettingFromState(\n state,\n 'HeaderType',\n getSiteSettingFromState(state, 'UseGradientHeader', Config.env.hasGradientHeader) ? 'gradient' : 'white',\n ),\n };\n};\n\nconst touchableSearchBar = connect(mapStateToProps, {})(TouchableSearchBar);\nexport { touchableSearchBar as TouchableSearchBar };\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,wBAAwB,EAAEC,IAAI,QAAQ,cAAc;AACnE,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,uBAAuB,QAAQ,WAAW;AACnD,SAASC,UAAU,EAAEC,OAAO,QAAQ,YAAY;AAChD,SAASC,QAAQ,QAAQ,UAAU;AACnC,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,WAAW;AAE5C,MAAMC,kBAAkB,SAASX,SAAS,CAAC;EAAAY,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,wBACzB,MAAM;MACpBJ,QAAQ,CAACK,UAAU,CAACC,QAAQ,CAAC,QAAQ,EAAE;QAAEC,YAAY,EAAE,IAAI,CAACC,KAAK,CAACD,YAAY;QAAEE,UAAU,EAAE,IAAI,CAACD,KAAK,CAACC;MAAW,CAAC,CAAC;IACtH,CAAC;EAAA;EAEDC,MAAMA,CAAA,EAAG;IACP,oBACErB,KAAA,CAAAsB,aAAA,CAACnB,wBAAwB;MAACoB,OAAO,EAAE,IAAI,CAACC;IAAc,gBACpDxB,KAAA,CAAAsB,aAAA,CAACpB,IAAI;MAACuB,KAAK,EAAE,CAACC,MAAM,CAACC,oBAAoB,EAAE,IAAI,CAACR,KAAK,CAACS,UAAU,KAAK,OAAO,IAAI;QAAEC,eAAe,EAAE;MAAO,CAAC,EAAE,IAAI,CAACV,KAAK,CAACM,KAAK;IAAE,gBAC7HzB,KAAA,CAAAsB,aAAA,CAACb,QAAQ;MAACqB,IAAI,EAAC,SAAS;MAACL,KAAK,EAAEC,MAAM,CAACK;IAAW,CAAE,CAAC,eACrD/B,KAAA,CAAAsB,aAAA,CAAClB,IAAI;MAACqB,KAAK,EAAEC,MAAM,CAACM;IAAW,GAAG,UAAS,IAAI,CAACb,KAAK,CAACC,UAAW,EAAQ,CACrE,CACkB,CAAC;EAE/B;AACF;AAEA,MAAMM,MAAM,GAAG;EACbC,oBAAoB,EAAE;IACpBM,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,EAAE;IACVC,gBAAgB,EAAE,EAAE;IACpBC,cAAc,EAAE,EAAE;IAClBC,YAAY,EAAE,EAAE;IAChBR,eAAe,EAAErB,OAAO;IACxB8B,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,aAAa,EAAE,KAAK;IACpBC,iBAAiB,EAAE;EACrB,CAAC;EACDV,UAAU,EAAE;IACVW,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAEpC,UAAU;IACjBqC,WAAW,EAAE;EACf,CAAC;EACDZ,UAAU,EAAE;IACVU,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAEpC,UAAU;IACjBsC,UAAU,EAAE;EACd;AACF,CAAC;AAED,MAAMC,eAAe,GAAGC,KAAK,IAAI;EAC/B,OAAO;IACLnB,UAAU,EAAEtB,uBAAuB,CACjCyC,KAAK,EACL,YAAY,EACZzC,uBAAuB,CAACyC,KAAK,EAAE,mBAAmB,EAAErC,MAAM,CAACsC,GAAG,CAACC,iBAAiB,CAAC,GAAG,UAAU,GAAG,OACnG;EACF,CAAC;AACH,CAAC;AAED,MAAMC,kBAAkB,GAAG7C,OAAO,CAACyC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAClC,kBAAkB,CAAC;AAC3E,SAASsC,kBAAkB,IAAItC,kBAAkB"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { Text, View, Dimensions, Modal, ScrollView, TouchableWithoutFeedback, Platform } from 'react-native';
|
|
3
|
+
import { connect } from 'react-redux';
|
|
4
|
+
import { TEXT_DARK, LINEGREY, getMainBrandingColourFromState } from '../colours';
|
|
5
|
+
import UserListing from './UserListing';
|
|
6
|
+
import { InlineButton } from './InlineButton';
|
|
7
|
+
const SCREEN_HEIGHT = Dimensions.get('window').height;
|
|
8
|
+
class UserListPopup extends Component {
|
|
9
|
+
getRenderKey(user, userKey) {
|
|
10
|
+
if (user.id) {
|
|
11
|
+
return `${user.id}${userKey}`;
|
|
12
|
+
}
|
|
13
|
+
if (user.userId) {
|
|
14
|
+
return `${user.userId}${userKey}`;
|
|
15
|
+
}
|
|
16
|
+
return userKey;
|
|
17
|
+
}
|
|
18
|
+
renderHeader() {
|
|
19
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
20
|
+
style: styles.titleContainer
|
|
21
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
22
|
+
style: styles.titleContent
|
|
23
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
24
|
+
style: styles.title
|
|
25
|
+
}, this.props.title)));
|
|
26
|
+
}
|
|
27
|
+
renderScrollContainer() {
|
|
28
|
+
return /*#__PURE__*/React.createElement(ScrollView, {
|
|
29
|
+
style: styles.optionsContainer,
|
|
30
|
+
keyboardShouldPersistTaps: "handled"
|
|
31
|
+
}, this.props.users.map((user, userIndex) => {
|
|
32
|
+
return /*#__PURE__*/React.createElement(UserListing, {
|
|
33
|
+
user: user,
|
|
34
|
+
key: this.getRenderKey(user, userIndex),
|
|
35
|
+
index: userIndex
|
|
36
|
+
});
|
|
37
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
38
|
+
style: styles.scrollFooterSpace
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
renderFooter() {
|
|
42
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
43
|
+
style: styles.footer
|
|
44
|
+
}, /*#__PURE__*/React.createElement(InlineButton, {
|
|
45
|
+
onPress: this.props.onClose.bind(this),
|
|
46
|
+
color: this.props.colourBrandingMain,
|
|
47
|
+
style: [styles.footerButton]
|
|
48
|
+
}, "Done"));
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
52
|
+
visible: this.props.visible,
|
|
53
|
+
transparent: true,
|
|
54
|
+
animationType: "slide",
|
|
55
|
+
onRequestClose: this.props.onClose
|
|
56
|
+
}, /*#__PURE__*/React.createElement(ScrollView, {
|
|
57
|
+
keyboardShouldPersistTaps: "always"
|
|
58
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
59
|
+
style: styles.popup
|
|
60
|
+
}, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
|
61
|
+
onPress: this.props.onClose
|
|
62
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
63
|
+
style: styles.popupOverlay
|
|
64
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
65
|
+
style: [styles.popupContent, {
|
|
66
|
+
minHeight: SCREEN_HEIGHT - (Platform.OS === 'android' ? 175 : 150)
|
|
67
|
+
}, {
|
|
68
|
+
marginTop: 60,
|
|
69
|
+
minHeight: SCREEN_HEIGHT - (Platform.OS === 'android' ? 85 : 60)
|
|
70
|
+
}]
|
|
71
|
+
}, this.renderHeader(), this.renderScrollContainer(), this.renderFooter()))));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const styles = {
|
|
75
|
+
popup: {
|
|
76
|
+
flex: 1,
|
|
77
|
+
justifyContent: 'center'
|
|
78
|
+
},
|
|
79
|
+
popupOverlay: {
|
|
80
|
+
position: 'absolute',
|
|
81
|
+
backgroundColor: 'rgba(19, 19, 26, .25)',
|
|
82
|
+
top: 0,
|
|
83
|
+
left: 0,
|
|
84
|
+
right: 0,
|
|
85
|
+
bottom: 0
|
|
86
|
+
},
|
|
87
|
+
popupContent: {
|
|
88
|
+
borderRadius: 3,
|
|
89
|
+
marginTop: 150,
|
|
90
|
+
backgroundColor: '#fff',
|
|
91
|
+
flex: 1,
|
|
92
|
+
borderTopLeftRadius: 15,
|
|
93
|
+
borderTopRightRadius: 15
|
|
94
|
+
},
|
|
95
|
+
footer: {
|
|
96
|
+
padding: 8,
|
|
97
|
+
borderTopWidth: 1,
|
|
98
|
+
borderColor: LINEGREY,
|
|
99
|
+
backgroundColor: '#fff'
|
|
100
|
+
},
|
|
101
|
+
footerButton: {
|
|
102
|
+
width: '100%',
|
|
103
|
+
height: 40
|
|
104
|
+
},
|
|
105
|
+
titleContainer: {
|
|
106
|
+
alignSelf: 'stretch',
|
|
107
|
+
padding: 24,
|
|
108
|
+
paddingTop: 16,
|
|
109
|
+
paddingBottom: 0
|
|
110
|
+
},
|
|
111
|
+
titleContent: {
|
|
112
|
+
borderColor: LINEGREY,
|
|
113
|
+
borderBottomWidth: 1,
|
|
114
|
+
flexDirection: 'row',
|
|
115
|
+
justifyContent: 'space-between',
|
|
116
|
+
paddingBottom: 15
|
|
117
|
+
},
|
|
118
|
+
title: {
|
|
119
|
+
fontSize: 15,
|
|
120
|
+
fontFamily: 'sf-semibold',
|
|
121
|
+
color: TEXT_DARK
|
|
122
|
+
},
|
|
123
|
+
optionsContainer: {
|
|
124
|
+
flex: 1,
|
|
125
|
+
paddingVertical: 8
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
const mapStateToProps = state => {
|
|
129
|
+
return {
|
|
130
|
+
colourBrandingMain: getMainBrandingColourFromState(state)
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
const userListPopup = connect(mapStateToProps, {})(UserListPopup);
|
|
134
|
+
export { userListPopup as UserListPopup };
|
|
135
|
+
//# sourceMappingURL=UserListPopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Component","Text","View","Dimensions","Modal","ScrollView","TouchableWithoutFeedback","Platform","connect","TEXT_DARK","LINEGREY","getMainBrandingColourFromState","UserListing","InlineButton","SCREEN_HEIGHT","get","height","UserListPopup","getRenderKey","user","userKey","id","userId","renderHeader","createElement","style","styles","titleContainer","titleContent","title","props","renderScrollContainer","optionsContainer","keyboardShouldPersistTaps","users","map","userIndex","key","index","scrollFooterSpace","renderFooter","footer","onPress","onClose","bind","color","colourBrandingMain","footerButton","render","visible","transparent","animationType","onRequestClose","popup","popupOverlay","popupContent","minHeight","OS","marginTop","flex","justifyContent","position","backgroundColor","top","left","right","bottom","borderRadius","borderTopLeftRadius","borderTopRightRadius","padding","borderTopWidth","borderColor","width","alignSelf","paddingTop","paddingBottom","borderBottomWidth","flexDirection","fontSize","fontFamily","paddingVertical","mapStateToProps","state","userListPopup"],"sources":["UserListPopup.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { Text, View, Dimensions, Modal, ScrollView, TouchableWithoutFeedback, Platform } from 'react-native';\nimport { connect } from 'react-redux';\nimport { TEXT_DARK, LINEGREY, getMainBrandingColourFromState } from '../colours';\nimport UserListing from './UserListing';\nimport { InlineButton } from './InlineButton';\n\nconst SCREEN_HEIGHT = Dimensions.get('window').height;\n\nclass UserListPopup extends Component {\n getRenderKey(user, userKey) {\n if (user.id) {\n return `${user.id}${userKey}`;\n }\n if (user.userId) {\n return `${user.userId}${userKey}`;\n }\n return userKey;\n }\n\n renderHeader() {\n return (\n <View style={styles.titleContainer}>\n <View style={styles.titleContent}>\n <Text style={styles.title}>{this.props.title}</Text>\n </View>\n </View>\n );\n }\n\n renderScrollContainer() {\n return (\n <ScrollView style={styles.optionsContainer} keyboardShouldPersistTaps=\"handled\">\n {this.props.users.map((user, userIndex) => {\n return <UserListing user={user} key={this.getRenderKey(user, userIndex)} index={userIndex} />;\n })}\n <View style={styles.scrollFooterSpace} />\n </ScrollView>\n );\n }\n\n renderFooter() {\n return (\n <View style={styles.footer}>\n <InlineButton onPress={this.props.onClose.bind(this)} color={this.props.colourBrandingMain} style={[styles.footerButton]}>\n Done\n </InlineButton>\n </View>\n );\n }\n\n render() {\n return (\n <Modal visible={this.props.visible} transparent animationType=\"slide\" onRequestClose={this.props.onClose}>\n <ScrollView keyboardShouldPersistTaps=\"always\">\n <View style={styles.popup}>\n <TouchableWithoutFeedback onPress={this.props.onClose}>\n <View style={styles.popupOverlay} />\n </TouchableWithoutFeedback>\n <View\n style={[\n styles.popupContent,\n { minHeight: SCREEN_HEIGHT - (Platform.OS === 'android' ? 175 : 150) },\n { marginTop: 60, minHeight: SCREEN_HEIGHT - (Platform.OS === 'android' ? 85 : 60) },\n ]}\n >\n {this.renderHeader()}\n {this.renderScrollContainer()}\n {this.renderFooter()}\n </View>\n </View>\n </ScrollView>\n </Modal>\n );\n }\n}\n\nconst styles = {\n popup: {\n flex: 1,\n justifyContent: 'center',\n },\n popupOverlay: {\n position: 'absolute',\n backgroundColor: 'rgba(19, 19, 26, .25)',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n },\n popupContent: {\n borderRadius: 3,\n marginTop: 150,\n backgroundColor: '#fff',\n flex: 1,\n borderTopLeftRadius: 15,\n borderTopRightRadius: 15,\n },\n footer: {\n padding: 8,\n borderTopWidth: 1,\n borderColor: LINEGREY,\n backgroundColor: '#fff',\n },\n footerButton: {\n width: '100%',\n height: 40,\n },\n titleContainer: {\n alignSelf: 'stretch',\n padding: 24,\n paddingTop: 16,\n paddingBottom: 0,\n },\n titleContent: {\n borderColor: LINEGREY,\n borderBottomWidth: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingBottom: 15,\n },\n title: {\n fontSize: 15,\n fontFamily: 'sf-semibold',\n color: TEXT_DARK,\n },\n optionsContainer: {\n flex: 1,\n paddingVertical: 8,\n },\n};\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: getMainBrandingColourFromState(state),\n };\n};\n\nconst userListPopup = connect(mapStateToProps, {})(UserListPopup);\nexport { userListPopup as UserListPopup };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAEC,UAAU,EAAEC,w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9D,QAAQ;IACrBmE,iBAAiB,EAAE,CAAC;IACpBC,aAAa,EAAE,KAAK;IACpBlB,cAAc,EAAE,eAAe;IAC/BgB,aAAa,EAAE;EACjB,CAAC;EACD/C,KAAK,EAAE;IACLkD,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,aAAa;IACzBnC,KAAK,EAAEpC;EACT,CAAC;EACDuB,gBAAgB,EAAE;IAChB2B,IAAI,EAAE,CAAC;IACPsB,eAAe,EAAE;EACnB;AACF,CAAC;AAED,MAAMC,eAAe,GAAGC,KAAK,IAAI;EAC/B,OAAO;IACLrC,kBAAkB,EAAEnC,8BAA8B,CAACwE,KAAK;EAC1D,CAAC;AACH,CAAC;AAED,MAAMC,aAAa,GAAG5E,OAAO,CAAC0E,eAAe,EAAE,CAAC,CAAC,CAAC,CAACjE,aAAa,CAAC;AACjE,SAASmE,aAAa,IAAInE,aAAa"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import { TouchableOpacity, Text, View } from 'react-native';
|
|
4
|
+
import { connect } from 'react-redux';
|
|
5
|
+
import moment from 'moment';
|
|
6
|
+
import { COLOUR_GREEN, TEXT_DARK, TEXT_LIGHT, getMainBrandingColourFromState, getLightBrandingColourFromState } from '../colours';
|
|
7
|
+
import { Services } from '../config';
|
|
8
|
+
import { ProfilePic } from './ProfilePic';
|
|
9
|
+
import { InlineButton } from './InlineButton';
|
|
10
|
+
import { Spinner } from './Spinner';
|
|
11
|
+
import { followerActions } from '../apis';
|
|
12
|
+
import { addFollower } from '../actions';
|
|
13
|
+
class UserListing extends Component {
|
|
14
|
+
constructor(props) {
|
|
15
|
+
super(props);
|
|
16
|
+
this.state = {
|
|
17
|
+
pending: false
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
onPress() {
|
|
21
|
+
const {
|
|
22
|
+
hidden
|
|
23
|
+
} = this.props.me;
|
|
24
|
+
if (hidden && _.includes(hidden, 'people')) return;
|
|
25
|
+
if (this.props.onPress) {
|
|
26
|
+
this.props.onPress();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const user = {
|
|
30
|
+
...this.props.user
|
|
31
|
+
};
|
|
32
|
+
if (_.isUndefined(user.key)) {
|
|
33
|
+
user.key = user.userId;
|
|
34
|
+
}
|
|
35
|
+
if (_.isUndefined(user.id)) {
|
|
36
|
+
user.id = user.userId;
|
|
37
|
+
}
|
|
38
|
+
Services.navigation.navigate('profile', {
|
|
39
|
+
user
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
onFollowUser() {
|
|
43
|
+
const userToSave = {
|
|
44
|
+
profilePic: this.props.user.profilePic,
|
|
45
|
+
displayName: this.props.user.displayName,
|
|
46
|
+
id: this.props.user.id
|
|
47
|
+
};
|
|
48
|
+
this.setState({
|
|
49
|
+
pending: true
|
|
50
|
+
});
|
|
51
|
+
followerActions.addFollower(userToSave, this.props.myId).then(() => {
|
|
52
|
+
this.props.addFollower(userToSave);
|
|
53
|
+
}).catch(() => {
|
|
54
|
+
this.setState({
|
|
55
|
+
pending: false
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
getTimeText(input) {
|
|
60
|
+
const gug = moment.unix(input);
|
|
61
|
+
if (gug.isBefore(moment().local().startOf('d'))) {
|
|
62
|
+
return gug.format('D MMM');
|
|
63
|
+
}
|
|
64
|
+
return gug.format('h:mma');
|
|
65
|
+
}
|
|
66
|
+
getProfilePic() {
|
|
67
|
+
if (this.props.user.profilePic == null) return null;
|
|
68
|
+
let profilePic = this.props.user.profilePic;
|
|
69
|
+
if (!_.isUndefined(this.props.user.profilePicThumb) && !_.isEmpty(this.props.user.profilePicThumb)) {
|
|
70
|
+
profilePic = this.props.user.profilePicThumb;
|
|
71
|
+
} else if (this.props.user.profilePic.indexOf('.amazonaws.com/1400/') > -1) {
|
|
72
|
+
profilePic = profilePic.replace('/1400/', '/300/');
|
|
73
|
+
}
|
|
74
|
+
return profilePic;
|
|
75
|
+
}
|
|
76
|
+
getLastMessage(chat) {
|
|
77
|
+
if (typeof chat.lastMessage === 'string') {
|
|
78
|
+
return chat.lastMessage;
|
|
79
|
+
}
|
|
80
|
+
// TODO recognise user name of last message
|
|
81
|
+
return chat.lastMessage.text;
|
|
82
|
+
}
|
|
83
|
+
renderFollowButton() {
|
|
84
|
+
if (this.props.user.privateChat) {
|
|
85
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
86
|
+
style: {
|
|
87
|
+
justifyContent: 'flex-start'
|
|
88
|
+
}
|
|
89
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
90
|
+
style: [styles.chatTimeStamp, this.props.user.unread > 0 && {
|
|
91
|
+
color: TEXT_DARK,
|
|
92
|
+
fontFamily: 'sf-bold'
|
|
93
|
+
}]
|
|
94
|
+
}, this.getTimeText(this.props.user.Changed)), /*#__PURE__*/React.createElement(View, {
|
|
95
|
+
style: [{
|
|
96
|
+
flexDirection: 'row-reverse',
|
|
97
|
+
marginTop: 2
|
|
98
|
+
}, this.props.user.unread === 0 && {
|
|
99
|
+
opacity: 0
|
|
100
|
+
}]
|
|
101
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
102
|
+
style: styles.counter
|
|
103
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
104
|
+
style: styles.counterText
|
|
105
|
+
}, this.props.user.unread))));
|
|
106
|
+
}
|
|
107
|
+
if (!this.props.showFriendsButton) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// self
|
|
112
|
+
if (this.props.myId === this.props.user.id) {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// already following
|
|
117
|
+
if (this.props.isFollowing) {
|
|
118
|
+
return /*#__PURE__*/React.createElement(InlineButton, {
|
|
119
|
+
color: this.props.colourBrandingLight,
|
|
120
|
+
style: styles.friendsButton,
|
|
121
|
+
textStyle: {
|
|
122
|
+
color: this.props.colourBrandingMain
|
|
123
|
+
},
|
|
124
|
+
disabled: true
|
|
125
|
+
}, "Friends");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// in process of following
|
|
129
|
+
if (this.state.pending) {
|
|
130
|
+
return /*#__PURE__*/React.createElement(InlineButton, {
|
|
131
|
+
style: [styles.friendsButton, {
|
|
132
|
+
borderColor: this.props.colourBrandingMain,
|
|
133
|
+
borderWidth: 1
|
|
134
|
+
}],
|
|
135
|
+
disabled: true,
|
|
136
|
+
noText: true
|
|
137
|
+
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
138
|
+
size: "small",
|
|
139
|
+
color: this.props.colourBrandingMain
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// not following yet
|
|
144
|
+
return /*#__PURE__*/React.createElement(InlineButton, {
|
|
145
|
+
onPress: this.onFollowUser.bind(this),
|
|
146
|
+
color: "#fff",
|
|
147
|
+
style: [styles.friendsButton, {
|
|
148
|
+
borderColor: this.props.colourBrandingMain,
|
|
149
|
+
borderWidth: 1
|
|
150
|
+
}],
|
|
151
|
+
textStyle: {
|
|
152
|
+
color: this.props.colourBrandingMain
|
|
153
|
+
}
|
|
154
|
+
}, "Add friend");
|
|
155
|
+
}
|
|
156
|
+
renderStatusText() {
|
|
157
|
+
if (!this.props.statusText) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
161
|
+
style: styles.statusText
|
|
162
|
+
}, this.props.statusText);
|
|
163
|
+
}
|
|
164
|
+
render() {
|
|
165
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
166
|
+
style: this.props.containerStyle
|
|
167
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
168
|
+
activeOpacity: 0.9,
|
|
169
|
+
onPress: this.onPress.bind(this),
|
|
170
|
+
disabled: this.props.onPressDisabled
|
|
171
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
172
|
+
style: [styles.listItem, this.props.listItemStyle]
|
|
173
|
+
}, this.renderStatusText(), /*#__PURE__*/React.createElement(ProfilePic, {
|
|
174
|
+
ProfilePic: this.getProfilePic(),
|
|
175
|
+
Diameter: 42
|
|
176
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
177
|
+
style: [styles.fill, styles.flexRowReverse, styles.alignCenter]
|
|
178
|
+
}, this.props.rightContent, this.renderFollowButton(), /*#__PURE__*/React.createElement(View, {
|
|
179
|
+
style: styles.fill
|
|
180
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
181
|
+
style: styles.listItemTextContainer
|
|
182
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
183
|
+
style: styles.contactName,
|
|
184
|
+
numberOfLines: 1
|
|
185
|
+
}, this.props.user.displayName), this.props.user.privateChat && /*#__PURE__*/React.createElement(Text, {
|
|
186
|
+
style: styles.chatLastMessage,
|
|
187
|
+
numberOfLines: 1
|
|
188
|
+
}, this.getLastMessage(this.props.user)), this.props.subText))))));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const styles = {
|
|
192
|
+
listItem: {
|
|
193
|
+
paddingVertical: 8,
|
|
194
|
+
paddingHorizontal: 16,
|
|
195
|
+
justifyContent: 'flex-start',
|
|
196
|
+
flexDirection: 'row',
|
|
197
|
+
position: 'relative'
|
|
198
|
+
},
|
|
199
|
+
listItemTextContainer: {
|
|
200
|
+
flex: 1,
|
|
201
|
+
flexDirection: 'column',
|
|
202
|
+
justifyContent: 'space-around',
|
|
203
|
+
paddingLeft: 16
|
|
204
|
+
},
|
|
205
|
+
contactName: {
|
|
206
|
+
fontSize: 15,
|
|
207
|
+
fontFamily: 'sf-semibold',
|
|
208
|
+
backgroundColor: 'rgba(255,255,255,0)',
|
|
209
|
+
color: TEXT_DARK
|
|
210
|
+
},
|
|
211
|
+
statusText: {
|
|
212
|
+
position: 'absolute',
|
|
213
|
+
top: 0,
|
|
214
|
+
left: 82,
|
|
215
|
+
fontFamily: 'sf-semibold',
|
|
216
|
+
fontSize: 12,
|
|
217
|
+
color: TEXT_LIGHT
|
|
218
|
+
},
|
|
219
|
+
fill: {
|
|
220
|
+
flex: 1
|
|
221
|
+
},
|
|
222
|
+
alignCenter: {
|
|
223
|
+
alignItems: 'center'
|
|
224
|
+
},
|
|
225
|
+
flexRowReverse: {
|
|
226
|
+
flexDirection: 'row-reverse'
|
|
227
|
+
},
|
|
228
|
+
friendsButton: {
|
|
229
|
+
width: 100
|
|
230
|
+
},
|
|
231
|
+
counter: {
|
|
232
|
+
borderRadius: 10,
|
|
233
|
+
height: 20,
|
|
234
|
+
justifyContent: 'center',
|
|
235
|
+
minWidth: 20,
|
|
236
|
+
paddingHorizontal: 4,
|
|
237
|
+
backgroundColor: COLOUR_GREEN
|
|
238
|
+
},
|
|
239
|
+
counterText: {
|
|
240
|
+
color: '#fff',
|
|
241
|
+
fontSize: 12,
|
|
242
|
+
fontFamily: 'sf-semibold',
|
|
243
|
+
textAlign: 'center'
|
|
244
|
+
},
|
|
245
|
+
chatTimeStamp: {
|
|
246
|
+
fontSize: 10,
|
|
247
|
+
fontFamily: 'sf-semibold',
|
|
248
|
+
color: TEXT_LIGHT
|
|
249
|
+
},
|
|
250
|
+
chatLastMessage: {
|
|
251
|
+
fontSize: 13,
|
|
252
|
+
fontFamily: 'sf-medium',
|
|
253
|
+
color: TEXT_LIGHT,
|
|
254
|
+
marginRight: 5
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
const mapStateToProps = state => {
|
|
258
|
+
return {
|
|
259
|
+
me: state.user,
|
|
260
|
+
colourBrandingMain: getMainBrandingColourFromState(state),
|
|
261
|
+
colourBrandingLight: getLightBrandingColourFromState(state)
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
export default connect(mapStateToProps, {
|
|
265
|
+
addFollower
|
|
266
|
+
})(UserListing);
|
|
267
|
+
//# sourceMappingURL=UserListing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Component","_","TouchableOpacity","Text","View","connect","moment","COLOUR_GREEN","TEXT_DARK","TEXT_LIGHT","getMainBrandingColourFromState","getLightBrandingColourFromState","Services","ProfilePic","InlineButton","Spinner","followerActions","addFollower","UserListing","constructor","props","state","pending","onPress","hidden","me","includes","user","isUndefined","key","userId","id","navigation","navigate","onFollowUser","userToSave","profilePic","displayName","setState","myId","then","catch","getTimeText","input","gug","unix","isBefore","local","startOf","format","getProfilePic","profilePicThumb","isEmpty","indexOf","replace","getLastMessage","chat","lastMessage","text","renderFollowButton","privateChat","createElement","style","justifyContent","styles","chatTimeStamp","unread","color","fontFamily","Changed","flexDirection","marginTop","opacity","counter","counterText","showFriendsButton","isFollowing","colourBrandingLight","friendsButton","textStyle","colourBrandingMain","disabled","borderColor","borderWidth","noText","size","bind","renderStatusText","statusText","render","containerStyle","activeOpacity","onPressDisabled","listItem","listItemStyle","Diameter","fill","flexRowReverse","alignCenter","rightContent","listItemTextContainer","contactName","numberOfLines","chatLastMessage","subText","paddingVertical","paddingHorizontal","position","flex","paddingLeft","fontSize","backgroundColor","top","left","alignItems","width","borderRadius","height","minWidth","textAlign","marginRight","mapStateToProps"],"sources":["UserListing.js"],"sourcesContent":["import React, { Component } from 'react';\nimport _ from 'lodash';\nimport { TouchableOpacity, Text, View } from 'react-native';\nimport { connect } from 'react-redux';\nimport moment from 'moment';\nimport { COLOUR_GREEN, TEXT_DARK, TEXT_LIGHT, getMainBrandingColourFromState, getLightBrandingColourFromState } from '../colours';\nimport { Services } from '../config';\nimport { ProfilePic } from './ProfilePic';\nimport { InlineButton } from './InlineButton';\nimport { Spinner } from './Spinner';\nimport { followerActions } from '../apis';\nimport { addFollower } from '../actions';\n\nclass UserListing extends Component {\n constructor(props) {\n super(props);\n this.state = { pending: false };\n }\n\n onPress() {\n const { hidden } = this.props.me;\n if (hidden && _.includes(hidden, 'people')) return;\n\n if (this.props.onPress) {\n this.props.onPress();\n return;\n }\n const user = { ...this.props.user };\n if (_.isUndefined(user.key)) {\n user.key = user.userId;\n }\n if (_.isUndefined(user.id)) {\n user.id = user.userId;\n }\n Services.navigation.navigate('profile', { user });\n }\n\n onFollowUser() {\n const userToSave = {\n profilePic: this.props.user.profilePic,\n displayName: this.props.user.displayName,\n id: this.props.user.id,\n };\n this.setState({ pending: true });\n followerActions\n .addFollower(userToSave, this.props.myId)\n .then(() => {\n this.props.addFollower(userToSave);\n })\n .catch(() => {\n this.setState({ pending: false });\n });\n }\n\n getTimeText(input) {\n const gug = moment.unix(input);\n if (\n gug.isBefore(\n moment()\n .local()\n .startOf('d'),\n )\n ) {\n return gug.format('D MMM');\n }\n return gug.format('h:mma');\n }\n\n getProfilePic() {\n if (this.props.user.profilePic == null) return null;\n let profilePic = this.props.user.profilePic;\n if (!_.isUndefined(this.props.user.profilePicThumb) && !_.isEmpty(this.props.user.profilePicThumb)) {\n profilePic = this.props.user.profilePicThumb;\n } else if (this.props.user.profilePic.indexOf('.amazonaws.com/1400/') > -1) {\n profilePic = profilePic.replace('/1400/', '/300/');\n }\n return profilePic;\n }\n\n getLastMessage(chat) {\n if (typeof chat.lastMessage === 'string') {\n return chat.lastMessage;\n }\n // TODO recognise user name of last message\n return chat.lastMessage.text;\n }\n\n renderFollowButton() {\n if (this.props.user.privateChat) {\n return (\n <View style={{ justifyContent: 'flex-start' }}>\n <Text style={[styles.chatTimeStamp, this.props.user.unread > 0 && { color: TEXT_DARK, fontFamily: 'sf-bold' }]}>\n {this.getTimeText(this.props.user.Changed)}\n </Text>\n <View style={[{ flexDirection: 'row-reverse', marginTop: 2 }, this.props.user.unread === 0 && { opacity: 0 }]}>\n <View style={styles.counter}>\n <Text style={styles.counterText}>{this.props.user.unread}</Text>\n </View>\n </View>\n </View>\n );\n }\n\n if (!this.props.showFriendsButton) {\n return null;\n }\n\n // self\n if (this.props.myId === this.props.user.id) {\n return null;\n }\n\n // already following\n if (this.props.isFollowing) {\n return (\n <InlineButton\n color={this.props.colourBrandingLight}\n style={styles.friendsButton}\n textStyle={{ color: this.props.colourBrandingMain }}\n disabled\n >\n Friends\n </InlineButton>\n );\n }\n\n // in process of following\n if (this.state.pending) {\n return (\n <InlineButton style={[styles.friendsButton, { borderColor: this.props.colourBrandingMain, borderWidth: 1 }]} disabled noText>\n <Spinner size=\"small\" color={this.props.colourBrandingMain} />\n </InlineButton>\n );\n }\n\n // not following yet\n return (\n <InlineButton\n onPress={this.onFollowUser.bind(this)}\n color=\"#fff\"\n style={[styles.friendsButton, { borderColor: this.props.colourBrandingMain, borderWidth: 1 }]}\n textStyle={{ color: this.props.colourBrandingMain }}\n >\n Add friend\n </InlineButton>\n );\n }\n\n renderStatusText() {\n if (!this.props.statusText) {\n return null;\n }\n return <Text style={styles.statusText}>{this.props.statusText}</Text>;\n }\n\n render() {\n return (\n <View style={this.props.containerStyle}>\n <TouchableOpacity activeOpacity={0.9} onPress={this.onPress.bind(this)} disabled={this.props.onPressDisabled}>\n <View style={[styles.listItem, this.props.listItemStyle]}>\n {this.renderStatusText()}\n <ProfilePic ProfilePic={this.getProfilePic()} Diameter={42} />\n <View style={[styles.fill, styles.flexRowReverse, styles.alignCenter]}>\n {this.props.rightContent}\n {this.renderFollowButton()}\n <View style={styles.fill}>\n <View style={styles.listItemTextContainer}>\n <Text style={styles.contactName} numberOfLines={1}>\n {this.props.user.displayName}\n </Text>\n {this.props.user.privateChat && (\n <Text style={styles.chatLastMessage} numberOfLines={1}>\n {this.getLastMessage(this.props.user)}\n </Text>\n )}\n {this.props.subText}\n </View>\n </View>\n </View>\n </View>\n </TouchableOpacity>\n </View>\n );\n }\n}\n\nconst styles = {\n listItem: {\n paddingVertical: 8,\n paddingHorizontal: 16,\n justifyContent: 'flex-start',\n flexDirection: 'row',\n position: 'relative',\n },\n listItemTextContainer: {\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'space-around',\n paddingLeft: 16,\n },\n contactName: {\n fontSize: 15,\n fontFamily: 'sf-semibold',\n backgroundColor: 'rgba(255,255,255,0)',\n color: TEXT_DARK,\n },\n statusText: {\n position: 'absolute',\n top: 0,\n left: 82,\n fontFamily: 'sf-semibold',\n fontSize: 12,\n color: TEXT_LIGHT,\n },\n fill: {\n flex: 1,\n },\n alignCenter: {\n alignItems: 'center',\n },\n flexRowReverse: {\n flexDirection: 'row-reverse',\n },\n friendsButton: {\n width: 100,\n },\n counter: {\n borderRadius: 10,\n height: 20,\n justifyContent: 'center',\n minWidth: 20,\n paddingHorizontal: 4,\n backgroundColor: COLOUR_GREEN,\n },\n counterText: {\n color: '#fff',\n fontSize: 12,\n fontFamily: 'sf-semibold',\n textAlign: 'center',\n },\n chatTimeStamp: {\n fontSize: 10,\n fontFamily: 'sf-semibold',\n color: TEXT_LIGHT,\n },\n chatLastMessage: {\n fontSize: 13,\n fontFamily: 'sf-medium',\n color: TEXT_LIGHT,\n marginRight: 5,\n },\n};\n\nconst mapStateToProps = state => {\n return {\n me: state.user,\n colourBrandingMain: getMainBrandingColourFromState(state),\n colourBrandingLight: getLightBrandingColourFromState(state),\n };\n};\n\nexport default connect(mapStateToProps, { addFollower })(UserListing);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,gBAAgB,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,OAAO,QAAQ,aAAa;AACrC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAASC,YAAY,EAAEC,SAAS,EAAEC,UAAU,EAAEC,8BAA8B,EAAEC,+BAA+B,QAAQ,YAAY;AACjI,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,eAAe,QAAQ,SAAS;AACzC,SAASC,WAAW,QAAQ,YAAY;AAExC,MAAMC,WAAW,SAASlB,SAAS,CAAC;EAClCmB,WAAWA,CAACC,KAAK,E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