@plusscommunities/pluss-circles-app 8.0.4 → 8.0.6-beta.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/ChatActions.js +3 -3
- package/dist/module/actions/ChatActions.js.map +1 -1
- package/dist/module/actions/GroupActions.js +18 -18
- package/dist/module/actions/GroupActions.js.map +1 -1
- package/dist/module/actions/index.js +3 -3
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +2 -2
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/assets/fonts.js +1 -1
- package/dist/module/assets/fonts.js.map +1 -1
- package/dist/module/components/chat/Chat.js +83 -101
- package/dist/module/components/chat/Chat.js.map +1 -1
- package/dist/module/components/chat/ChatList.js +49 -49
- package/dist/module/components/chat/ChatList.js.map +1 -1
- package/dist/module/components/chat/ContactsList.js +21 -21
- package/dist/module/components/chat/ContactsList.js.map +1 -1
- package/dist/module/components/chat/KioskPeoplePage.js +38 -37
- package/dist/module/components/chat/KioskPeoplePage.js.map +1 -1
- package/dist/module/components/chat/PeopleContainer.js +5 -5
- package/dist/module/components/chat/PeopleContainer.js.map +1 -1
- package/dist/module/components/chat/PeoplePage.js +41 -41
- package/dist/module/components/chat/PeoplePage.js.map +1 -1
- package/dist/module/components/common/SwipeableUserListing.js +22 -22
- package/dist/module/components/common/SwipeableUserListing.js.map +1 -1
- package/dist/module/components/common/index.js +2 -2
- package/dist/module/components/common/index.js.map +1 -1
- package/dist/module/components/events/EventInvitePopup.js +40 -40
- package/dist/module/components/events/EventInvitePopup.js.map +1 -1
- package/dist/module/components/groups/EditGroup.js +62 -62
- package/dist/module/components/groups/EditGroup.js.map +1 -1
- package/dist/module/components/groups/GroupDetails.js +32 -32
- package/dist/module/components/groups/GroupDetails.js.map +1 -1
- package/dist/module/components/groups/GroupsList.js +10 -10
- package/dist/module/components/groups/GroupsList.js.map +1 -1
- package/dist/module/components/groups/GroupsWidget.js +18 -18
- package/dist/module/components/groups/GroupsWidget.js.map +1 -1
- package/dist/module/components/groups/NewGroup.js +101 -101
- package/dist/module/components/groups/NewGroup.js.map +1 -1
- package/dist/module/components/groups/PublicGroup.js +17 -17
- package/dist/module/components/groups/PublicGroup.js.map +1 -1
- package/dist/module/components/groups/PublicGroupAction.js +39 -39
- package/dist/module/components/groups/PublicGroupAction.js.map +1 -1
- package/dist/module/components/notifications/GroupInvite.js +25 -25
- package/dist/module/components/notifications/GroupInvite.js.map +1 -1
- package/dist/module/components/notifications/GroupInviteAction.js +44 -44
- package/dist/module/components/notifications/GroupInviteAction.js.map +1 -1
- package/dist/module/components/notifications/GroupMessage.js +17 -17
- package/dist/module/components/notifications/GroupMessage.js.map +1 -1
- package/dist/module/components/takeover/TakeoverBackground.js +5 -5
- package/dist/module/components/takeover/TakeoverBackground.js.map +1 -1
- package/dist/module/config/index.js +2 -2
- package/dist/module/config/index.js.map +1 -1
- package/dist/module/core.config.js +1 -1
- package/dist/module/core.config.js.map +1 -1
- package/dist/module/feature.config.js +27 -27
- package/dist/module/feature.config.js.map +1 -1
- package/dist/module/index.js +14 -14
- package/dist/module/index.js.map +1 -1
- package/dist/module/js/Colors.js +1 -1
- package/dist/module/js/Colors.js.map +1 -1
- package/dist/module/js/NavigationService.js +1 -1
- package/dist/module/js/NavigationService.js.map +1 -1
- package/dist/module/js/Styles.js +1 -1
- package/dist/module/js/Styles.js.map +1 -1
- package/dist/module/js/circles/MapStateToDirectMessages.js +2 -2
- package/dist/module/js/circles/MapStateToDirectMessages.js.map +1 -1
- package/dist/module/js/index.js +3 -3
- package/dist/module/js/index.js.map +1 -1
- package/dist/module/reducers/ChatsReducer.js +4 -4
- package/dist/module/reducers/ChatsReducer.js.map +1 -1
- package/dist/module/reducers/GroupsReducer.js +5 -5
- package/dist/module/reducers/GroupsReducer.js.map +1 -1
- package/dist/module/reducers/reducerKeys.js +1 -1
- package/dist/module/reducers/reducerKeys.js.map +1 -1
- package/dist/module/values.config.default.js +25 -25
- package/dist/module/values.config.default.js.map +1 -1
- package/dist/module/values.config.groups.js +25 -25
- package/dist/module/values.config.groups.js.map +1 -1
- package/dist/module/values.config.js +25 -25
- package/dist/module/values.config.js.map +1 -1
- package/dist/module/webapi/circleActions.js +31 -31
- package/dist/module/webapi/circleActions.js.map +1 -1
- package/dist/module/webapi/helper.js +1 -1
- package/dist/module/webapi/helper.js.map +1 -1
- package/dist/module/webapi/index.js +3 -3
- package/dist/module/webapi/index.js.map +1 -1
- package/dist/module/webapi/messageActions.js +10 -10
- package/dist/module/webapi/messageActions.js.map +1 -1
- package/package.json +54 -54
- package/src/actions/ChatActions.js +55 -55
- package/src/actions/GroupActions.js +245 -237
- package/src/actions/index.js +3 -3
- package/src/actions/types.js +2 -2
- package/src/assets/fonts.js +1 -1
- package/src/components/chat/Chat.js +730 -669
- package/src/components/chat/ChatList.js +603 -512
- package/src/components/chat/ContactsList.js +186 -169
- package/src/components/chat/KioskPeoplePage.js +315 -291
- package/src/components/chat/PeopleContainer.js +14 -14
- package/src/components/chat/PeoplePage.js +450 -383
- package/src/components/common/SwipeableUserListing.js +118 -106
- package/src/components/common/index.js +2 -2
- package/src/components/events/EventInvitePopup.js +587 -505
- package/src/components/groups/EditGroup.js +607 -538
- package/src/components/groups/GroupDetails.js +385 -305
- package/src/components/groups/GroupsList.js +91 -79
- package/src/components/groups/GroupsWidget.js +122 -116
- package/src/components/groups/NewGroup.js +758 -639
- package/src/components/groups/PublicGroup.js +129 -101
- package/src/components/groups/PublicGroupAction.js +312 -244
- package/src/components/notifications/GroupInvite.js +167 -139
- package/src/components/notifications/GroupInviteAction.js +371 -273
- package/src/components/notifications/GroupMessage.js +110 -102
- package/src/components/takeover/TakeoverBackground.js +24 -18
- package/src/config/index.js +4 -4
- package/src/core.config.js +27 -3
- package/src/feature.config.js +257 -245
- package/src/index.js +24 -21
- package/src/js/Colors.js +5 -3
- package/src/js/NavigationService.js +5 -4
- package/src/js/Styles.js +1 -1
- package/src/js/circles/MapStateToDirectMessages.js +6 -6
- package/src/js/index.js +3 -3
- package/src/reducers/ChatsReducer.js +66 -53
- package/src/reducers/GroupsReducer.js +203 -190
- package/src/reducers/reducerKeys.js +1 -1
- package/src/values.config.default.js +29 -29
- package/src/values.config.groups.js +29 -29
- package/src/values.config.js +29 -29
- package/src/webapi/circleActions.js +109 -109
- package/src/webapi/helper.js +1 -1
- package/src/webapi/index.js +3 -3
- package/src/webapi/messageActions.js +47 -47
|
@@ -1,114 +1,122 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import { Text, View, TouchableOpacity, StyleSheet } from
|
|
3
|
-
import { connect } from
|
|
4
|
-
import _ from
|
|
5
|
-
import { ProfilePic } from
|
|
6
|
-
import { TEXT_DARK, TEXT_LIGHT, getFirstName } from
|
|
7
|
-
import { updateNavRead, clearGroupCounter } from
|
|
8
|
-
import NavigationService from
|
|
9
|
-
import { values } from
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import { Text, View, TouchableOpacity, StyleSheet } from "react-native";
|
|
3
|
+
import { connect } from "react-redux";
|
|
4
|
+
import _ from "lodash";
|
|
5
|
+
import { ProfilePic } from "../common";
|
|
6
|
+
import { TEXT_DARK, TEXT_LIGHT, getFirstName } from "../../js";
|
|
7
|
+
import { updateNavRead, clearGroupCounter } from "../../actions";
|
|
8
|
+
import NavigationService from "../../js/NavigationService";
|
|
9
|
+
import { values } from "../../values.config";
|
|
10
10
|
|
|
11
11
|
class GroupMessage extends Component {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
12
|
+
onPressChat = (message) => {
|
|
13
|
+
// if (message.isPrivate) {
|
|
14
|
+
// // TODO: No need to handle?
|
|
15
|
+
// NavigationService.navigate('profile', {
|
|
16
|
+
// user: {
|
|
17
|
+
// ...message.PrivateChatUser,
|
|
18
|
+
// key: message.PrivateChatUser ? message.PrivateChatUser.userId : '',
|
|
19
|
+
// id: message.PrivateChatUser ? message.PrivateChatUser.userId : '',
|
|
20
|
+
// },
|
|
21
|
+
// });
|
|
22
|
+
// } else {
|
|
23
|
+
this.props.updateNavRead({ openedNotifs: true });
|
|
24
|
+
this.props.clearGroupCounter(message.Id, this.props.user.uid);
|
|
25
|
+
NavigationService.navigate(values.screenCircleChat, { chat: message });
|
|
26
|
+
// }
|
|
27
|
+
};
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
getChatImage = (chat) => {
|
|
30
|
+
if (!_.isEmpty(chat.Thumbnail)) {
|
|
31
|
+
return chat.Thumbnail;
|
|
32
|
+
}
|
|
33
|
+
if (!_.isEmpty(chat.Image)) {
|
|
34
|
+
return chat.Image;
|
|
35
|
+
}
|
|
36
|
+
if (chat.IsPrivate) {
|
|
37
|
+
const otherUser = _.find(chat.Audience || [], (u) => {
|
|
38
|
+
return u.userId !== this.props.user.Id;
|
|
39
|
+
});
|
|
40
|
+
if (otherUser) {
|
|
41
|
+
return otherUser.profilePic;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
};
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
render() {
|
|
48
|
+
const { message, index } = this.props;
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
50
|
+
const chatImage = this.getChatImage(message);
|
|
51
|
+
return (
|
|
52
|
+
<View key={index} style={styles.notifWrapper}>
|
|
53
|
+
<TouchableOpacity
|
|
54
|
+
activeOpacity={0.9}
|
|
55
|
+
onPress={() => this.onPressChat(message)}
|
|
56
|
+
>
|
|
57
|
+
<View style={styles.notifInner}>
|
|
58
|
+
<View
|
|
59
|
+
style={{
|
|
60
|
+
marginRight: 16,
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
<ProfilePic Diameter={40} ProfilePic={chatImage} />
|
|
64
|
+
</View>
|
|
65
|
+
<View style={{ flex: 1 }}>
|
|
66
|
+
<Text style={styles.notifInner_title}>
|
|
67
|
+
{message.Title
|
|
68
|
+
? `New message in ${message.Title}`
|
|
69
|
+
: `Message from ${message?.lastMessage?.user?.name ? message.lastMessage.user.name : ""}`}
|
|
70
|
+
</Text>
|
|
71
|
+
<Text style={styles.notifInner_text}>
|
|
72
|
+
{message.isPrivate
|
|
73
|
+
? `${message.lastMessage?.text || ""}`.substring(0, 150)
|
|
74
|
+
: `${getFirstName(message.lastMessage?.user?.name || "Someone")} posted: ${message.lastMessage?.text || ""}`.substring(
|
|
75
|
+
0,
|
|
76
|
+
100,
|
|
77
|
+
)}
|
|
78
|
+
</Text>
|
|
79
|
+
</View>
|
|
80
|
+
</View>
|
|
81
|
+
</TouchableOpacity>
|
|
82
|
+
</View>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
const styles = StyleSheet.create({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
88
|
+
notifWrapper: {
|
|
89
|
+
width: "100%",
|
|
90
|
+
padding: 16,
|
|
91
|
+
paddingBottom: 0,
|
|
92
|
+
backgroundColor: "#fff",
|
|
93
|
+
},
|
|
94
|
+
notifInner: {
|
|
95
|
+
paddingBottom: 16,
|
|
96
|
+
flexDirection: "row",
|
|
97
|
+
borderBottomWidth: 1,
|
|
98
|
+
borderBottomColor: "rgb(235, 239, 242)",
|
|
99
|
+
},
|
|
100
|
+
notifInner_title: {
|
|
101
|
+
fontSize: 14,
|
|
102
|
+
fontFamily: "sf-semibold",
|
|
103
|
+
color: TEXT_DARK,
|
|
104
|
+
},
|
|
105
|
+
notifInner_text: {
|
|
106
|
+
marginTop: 4,
|
|
107
|
+
fontSize: 12,
|
|
108
|
+
lineHeight: 14,
|
|
109
|
+
fontFamily: "sf-regular",
|
|
110
|
+
color: TEXT_LIGHT,
|
|
111
|
+
},
|
|
106
112
|
});
|
|
107
113
|
|
|
108
|
-
const mapStateToProps = state => {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
const mapStateToProps = (state) => {
|
|
115
|
+
return {
|
|
116
|
+
user: state.user,
|
|
117
|
+
};
|
|
112
118
|
};
|
|
113
119
|
|
|
114
|
-
export default connect(mapStateToProps, { updateNavRead, clearGroupCounter })(
|
|
120
|
+
export default connect(mapStateToProps, { updateNavRead, clearGroupCounter })(
|
|
121
|
+
GroupMessage,
|
|
122
|
+
);
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import React, { PureComponent } from
|
|
2
|
-
import { View } from
|
|
1
|
+
import React, { PureComponent } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
3
|
|
|
4
4
|
class TakeoverBackground extends PureComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
render() {
|
|
6
|
+
return (
|
|
7
|
+
<View
|
|
8
|
+
style={[
|
|
9
|
+
styles.container,
|
|
10
|
+
this.props.style,
|
|
11
|
+
this.props.colour && { backgroundColor: this.props.colour },
|
|
12
|
+
]}
|
|
13
|
+
>
|
|
14
|
+
{this.props.children}
|
|
15
|
+
</View>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
const styles = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
container: {
|
|
22
|
+
flex: 1,
|
|
23
|
+
position: "relative",
|
|
24
|
+
backgroundColor: "#fff",
|
|
25
|
+
},
|
|
26
|
+
image: {
|
|
27
|
+
flex: 1,
|
|
28
|
+
position: "relative",
|
|
29
|
+
},
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
export default TakeoverBackground;
|
package/src/config/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Config } from
|
|
2
|
-
import { values } from
|
|
1
|
+
import { Config } from "../core.config";
|
|
2
|
+
import { values } from "../values.config";
|
|
3
3
|
|
|
4
4
|
export const CONST_STRINGS = {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
EMPTY_GROUPS: values.textEmptyGroups,
|
|
6
|
+
EMPTY_PEOPLE: values.textEmptyPeople,
|
|
7
7
|
};
|
|
8
8
|
export const getTinyChatDefault = () => Config.env.tinyChatDefault;
|
|
9
9
|
export const getNewEventDefaults = () => Config.env.newEventDefaults;
|
package/src/core.config.js
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
// import * as PlussCore from '../../pluss-core/src';
|
|
2
|
-
import * as PlussCore from
|
|
2
|
+
import * as PlussCore from "@plusscommunities/pluss-core-app";
|
|
3
3
|
|
|
4
|
-
const {
|
|
5
|
-
|
|
4
|
+
const {
|
|
5
|
+
Apis,
|
|
6
|
+
Fonts,
|
|
7
|
+
Actions,
|
|
8
|
+
ActionTypes,
|
|
9
|
+
Config,
|
|
10
|
+
Components,
|
|
11
|
+
Styles,
|
|
12
|
+
Session,
|
|
13
|
+
Helper,
|
|
14
|
+
Constants,
|
|
15
|
+
Colours,
|
|
16
|
+
} = PlussCore;
|
|
17
|
+
export {
|
|
18
|
+
Apis,
|
|
19
|
+
Fonts,
|
|
20
|
+
Actions,
|
|
21
|
+
ActionTypes,
|
|
22
|
+
Config,
|
|
23
|
+
Components,
|
|
24
|
+
Styles,
|
|
25
|
+
Session,
|
|
26
|
+
Helper,
|
|
27
|
+
Constants,
|
|
28
|
+
Colours,
|
|
29
|
+
};
|