@plusscommunities/pluss-circles-app 4.0.3 → 4.0.4
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.
|
@@ -52,6 +52,7 @@ class GroupMessage extends Component {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
+
var _message$lastMessage;
|
|
55
56
|
const {
|
|
56
57
|
message,
|
|
57
58
|
index
|
|
@@ -78,7 +79,7 @@ class GroupMessage extends Component {
|
|
|
78
79
|
}
|
|
79
80
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
80
81
|
style: styles.notifInner_title
|
|
81
|
-
}, message.
|
|
82
|
+
}, message.Title ? `New message in ${message.Title}` : `Message from ${message !== null && message !== void 0 && (_message$lastMessage = message.lastMessage) !== null && _message$lastMessage !== void 0 && (_message$lastMessage = _message$lastMessage.user) !== null && _message$lastMessage !== void 0 && _message$lastMessage.name ? message.lastMessage.user.name : ''}`), /*#__PURE__*/React.createElement(Text, {
|
|
82
83
|
style: styles.notifInner_text
|
|
83
84
|
}, message.isPrivate ? `${message.lastMessage.text}`.substring(0, 150) : `${getFirstName(message.lastMessage.user.name)} posted: ${message.lastMessage.text}`.substring(0, 100))))));
|
|
84
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","Text","View","TouchableOpacity","StyleSheet","connect","_","ProfilePic","TEXT_DARK","TEXT_LIGHT","getFirstName","updateNavRead","clearGroupCounter","NavigationService","values","GroupMessage","constructor","args","_defineProperty","message","props","openedNotifs","Id","user","uid","navigate","screenCircleChat","chat","isEmpty","Thumbnail","Image","IsPrivate","otherUser","find","Audience","u","userId","profilePic","render","index","chatImage","getChatImage","createElement","key","style","styles","notifWrapper","activeOpacity","onPress","onPressChat","notifInner","marginRight","Diameter","flex","notifInner_title","
|
|
1
|
+
{"version":3,"names":["React","Component","Text","View","TouchableOpacity","StyleSheet","connect","_","ProfilePic","TEXT_DARK","TEXT_LIGHT","getFirstName","updateNavRead","clearGroupCounter","NavigationService","values","GroupMessage","constructor","args","_defineProperty","message","props","openedNotifs","Id","user","uid","navigate","screenCircleChat","chat","isEmpty","Thumbnail","Image","IsPrivate","otherUser","find","Audience","u","userId","profilePic","render","_message$lastMessage","index","chatImage","getChatImage","createElement","key","style","styles","notifWrapper","activeOpacity","onPress","onPressChat","notifInner","marginRight","Diameter","flex","notifInner_title","Title","lastMessage","name","notifInner_text","isPrivate","text","substring","create","width","padding","paddingBottom","backgroundColor","flexDirection","borderBottomWidth","borderBottomColor","fontSize","fontFamily","color","marginTop","lineHeight","mapStateToProps","state"],"sources":["GroupMessage.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { Text, View, TouchableOpacity, StyleSheet } from 'react-native';\nimport { connect } from 'react-redux';\nimport _ from 'lodash';\nimport { ProfilePic } from '../common';\nimport { TEXT_DARK, TEXT_LIGHT, getFirstName } from '../../js';\nimport { updateNavRead, clearGroupCounter } from '../../actions';\nimport NavigationService from '../../js/NavigationService';\nimport { values } from '../../values.config';\n\nclass GroupMessage extends Component {\n onPressChat = message => {\n // if (message.isPrivate) {\n // // TODO: No need to handle?\n // NavigationService.navigate('profile', {\n // user: {\n // ...message.PrivateChatUser,\n // key: message.PrivateChatUser ? message.PrivateChatUser.userId : '',\n // id: message.PrivateChatUser ? message.PrivateChatUser.userId : '',\n // },\n // });\n // } else {\n this.props.updateNavRead({ openedNotifs: true });\n this.props.clearGroupCounter(message.Id, this.props.user.uid);\n NavigationService.navigate(values.screenCircleChat, { chat: message });\n // }\n };\n\n getChatImage = chat => {\n if (!_.isEmpty(chat.Thumbnail)) {\n return chat.Thumbnail;\n }\n if (!_.isEmpty(chat.Image)) {\n return chat.Image;\n }\n if (chat.IsPrivate) {\n const otherUser = _.find(chat.Audience || [], u => {\n return u.userId !== this.props.user.Id;\n });\n if (otherUser) {\n return otherUser.profilePic;\n }\n }\n return null;\n };\n\n render() {\n const { message, index } = this.props;\n\n const chatImage = this.getChatImage(message);\n return (\n <View key={index} style={styles.notifWrapper}>\n <TouchableOpacity activeOpacity={0.9} onPress={() => this.onPressChat(message)}>\n <View style={styles.notifInner}>\n <View\n style={{\n marginRight: 16,\n }}\n >\n <ProfilePic Diameter={40} ProfilePic={chatImage} />\n </View>\n <View style={{ flex: 1 }}>\n <Text style={styles.notifInner_title}>\n {message.Title\n ? `New message in ${message.Title}`\n : `Message from ${message?.lastMessage?.user?.name ? message.lastMessage.user.name : ''}`}\n </Text>\n <Text style={styles.notifInner_text}>\n {message.isPrivate\n ? `${message.lastMessage.text}`.substring(0, 150)\n : `${getFirstName(message.lastMessage.user.name)} posted: ${message.lastMessage.text}`.substring(0, 100)}\n </Text>\n </View>\n </View>\n </TouchableOpacity>\n </View>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n notifWrapper: {\n width: '100%',\n padding: 16,\n paddingBottom: 0,\n backgroundColor: '#fff',\n },\n notifInner: {\n paddingBottom: 16,\n flexDirection: 'row',\n borderBottomWidth: 1,\n borderBottomColor: 'rgb(235, 239, 242)',\n },\n notifInner_title: {\n fontSize: 14,\n fontFamily: 'sf-semibold',\n color: TEXT_DARK,\n },\n notifInner_text: {\n marginTop: 4,\n fontSize: 12,\n lineHeight: 14,\n fontFamily: 'sf-regular',\n color: TEXT_LIGHT,\n },\n});\n\nconst mapStateToProps = state => {\n return {\n user: state.user,\n };\n};\n\nexport default connect(mapStateToProps, { updateNavRead, clearGroupCounter })(GroupMessage);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AACvE,SAASC,OAAO,QAAQ,aAAa;AACrC,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,UAAU,QAAQ,WAAW;AACtC,SAASC,SAAS,EAAEC,UAAU,EAAEC,YAAY,QAAQ,UAAU;AAC9D,SAASC,aAAa,EAAEC,iBAAiB,QAAQ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
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "Extension package to enable circles on Pluss Communities Platform",
|
|
5
5
|
"main": "dist/module/index.js",
|
|
6
6
|
"module": "dist/module/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "ISC",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@plusscommunities/pluss-core-app": "4.0.2",
|
|
31
|
-
"axios": "^
|
|
31
|
+
"axios": "^1.6.8",
|
|
32
32
|
"lodash": "^4.17.4",
|
|
33
33
|
"moment": "^2.18.1",
|
|
34
34
|
"react": "18.2.0",
|
|
@@ -61,9 +61,9 @@ class GroupMessage extends Component {
|
|
|
61
61
|
</View>
|
|
62
62
|
<View style={{ flex: 1 }}>
|
|
63
63
|
<Text style={styles.notifInner_title}>
|
|
64
|
-
{message.
|
|
65
|
-
? `
|
|
66
|
-
: `
|
|
64
|
+
{message.Title
|
|
65
|
+
? `New message in ${message.Title}`
|
|
66
|
+
: `Message from ${message?.lastMessage?.user?.name ? message.lastMessage.user.name : ''}`}
|
|
67
67
|
</Text>
|
|
68
68
|
<Text style={styles.notifInner_text}>
|
|
69
69
|
{message.isPrivate
|