@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,154 +1,182 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import { Text, View, ImageBackground, TouchableOpacity } from
|
|
3
|
-
import { connect } from
|
|
4
|
-
import _ from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import { Text, View, ImageBackground, TouchableOpacity } from "react-native";
|
|
3
|
+
import { connect } from "react-redux";
|
|
4
|
+
import _ from "lodash";
|
|
5
|
+
import {
|
|
6
|
+
TEXT_LIGHT,
|
|
7
|
+
TEXT_DARK,
|
|
8
|
+
getFirstName,
|
|
9
|
+
getMainBrandingColourFromState,
|
|
10
|
+
} from "../../js";
|
|
11
|
+
import { Pl60Icon } from "../../assets/fonts";
|
|
12
|
+
import GroupInviteAction from "./GroupInviteAction";
|
|
8
13
|
|
|
9
14
|
class GroupInvite extends Component {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(props);
|
|
17
|
+
this.state = {
|
|
18
|
+
event: {},
|
|
19
|
+
showingAction: false,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
UNSAFE_componentWillMount() {
|
|
24
|
+
this.setState({ event: this.props.event });
|
|
25
|
+
}
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
onPressEvent() {
|
|
28
|
+
this.setState({ showingAction: true });
|
|
29
|
+
}
|
|
25
30
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
getShortName(name) {
|
|
32
|
+
if (!name) {
|
|
33
|
+
return name;
|
|
34
|
+
}
|
|
35
|
+
const names = name.split(",")[0].match(/\b\w/g);
|
|
36
|
+
return names && names.length > 0
|
|
37
|
+
? `${names[0]}${names.length > 1 ? names[names.length - 1] : ""}`
|
|
38
|
+
: "";
|
|
39
|
+
}
|
|
33
40
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
renderInviteAction() {
|
|
42
|
+
return (
|
|
43
|
+
<GroupInviteAction
|
|
44
|
+
group={this.state.event}
|
|
45
|
+
onClose={() => {
|
|
46
|
+
this.setState({ showingAction: false });
|
|
47
|
+
}}
|
|
48
|
+
showingAction={this.state.showingAction}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
45
52
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
53
|
+
render() {
|
|
54
|
+
if (_.isEmpty(this.state.event)) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return (
|
|
58
|
+
<View>
|
|
59
|
+
{this.renderInviteAction()}
|
|
60
|
+
{this.props.showHeader && (
|
|
61
|
+
<View style={styles.sectionTitleContainer}>
|
|
62
|
+
<Text style={styles.sectionTitle} allowFontScaling={false}>
|
|
63
|
+
{this.props.index === 0 ? "Invitations" : ""}
|
|
64
|
+
</Text>
|
|
65
|
+
</View>
|
|
66
|
+
)}
|
|
67
|
+
<TouchableOpacity
|
|
68
|
+
onPress={this.onPressEvent.bind(this)}
|
|
69
|
+
style={[
|
|
70
|
+
styles.inviteCard,
|
|
71
|
+
this.props.index === 0 && { marginLeft: 16 },
|
|
72
|
+
]}
|
|
73
|
+
>
|
|
74
|
+
<ImageBackground
|
|
75
|
+
style={[
|
|
76
|
+
styles.inviteImage,
|
|
77
|
+
{
|
|
78
|
+
backgroundColor: this.props.colourBrandingMain,
|
|
79
|
+
justifyContent: "center",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
},
|
|
82
|
+
]}
|
|
83
|
+
imageStyle={{ borderRadius: 5 }}
|
|
84
|
+
source={this.state.event.Image && { uri: this.state.event.Image }}
|
|
85
|
+
>
|
|
86
|
+
{!this.state.event.Image && this.state.event.Title && (
|
|
87
|
+
<Text style={styles.groupText}>
|
|
88
|
+
{this.getShortName(this.state.event.Title)}
|
|
89
|
+
</Text>
|
|
90
|
+
)}
|
|
91
|
+
<View style={styles.iconWrapper}>
|
|
92
|
+
<Pl60Icon
|
|
93
|
+
name="friends"
|
|
94
|
+
style={[
|
|
95
|
+
styles.iconStyle,
|
|
96
|
+
{ color: this.props.colourBrandingMain },
|
|
97
|
+
]}
|
|
98
|
+
/>
|
|
99
|
+
</View>
|
|
100
|
+
</ImageBackground>
|
|
101
|
+
<View>
|
|
102
|
+
<Text numberOfLines={1} style={styles.inviteTitle}>
|
|
103
|
+
{this.state.event.Title}
|
|
104
|
+
</Text>
|
|
105
|
+
<Text numberOfLines={1} style={styles.inviteText}>
|
|
106
|
+
{`${getFirstName(this.props.invite.InvitedBy)} invited you`}
|
|
107
|
+
</Text>
|
|
108
|
+
</View>
|
|
109
|
+
</TouchableOpacity>
|
|
110
|
+
</View>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
85
113
|
}
|
|
86
114
|
|
|
87
115
|
const styles = {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
116
|
+
inviteCard: {
|
|
117
|
+
width: 125,
|
|
118
|
+
marginRight: 28,
|
|
119
|
+
},
|
|
120
|
+
inviteImage: {
|
|
121
|
+
height: 125,
|
|
122
|
+
width: 125,
|
|
123
|
+
borderRadius: 5,
|
|
124
|
+
},
|
|
125
|
+
inviteTitle: {
|
|
126
|
+
marginTop: 8,
|
|
127
|
+
fontFamily: "sf-semibold",
|
|
128
|
+
fontSize: 14,
|
|
129
|
+
lineHeight: 16,
|
|
130
|
+
color: TEXT_DARK,
|
|
131
|
+
backgroundColor: "transparent",
|
|
132
|
+
},
|
|
133
|
+
inviteText: {
|
|
134
|
+
fontFamily: "sf-regular",
|
|
135
|
+
fontSize: 12,
|
|
136
|
+
lineHeight: 16,
|
|
137
|
+
color: TEXT_LIGHT,
|
|
138
|
+
backgroundColor: "transparent",
|
|
139
|
+
},
|
|
140
|
+
groupText: {
|
|
141
|
+
fontFamily: "sf-semibold",
|
|
142
|
+
fontSize: 24,
|
|
143
|
+
color: "#fff",
|
|
144
|
+
backgroundColor: "transparent",
|
|
145
|
+
},
|
|
146
|
+
iconWrapper: {
|
|
147
|
+
height: 24,
|
|
148
|
+
width: 24,
|
|
149
|
+
backgroundColor: "#fff",
|
|
150
|
+
borderRadius: 12,
|
|
151
|
+
position: "absolute",
|
|
152
|
+
bottom: 5,
|
|
153
|
+
right: 5,
|
|
154
|
+
zIndex: 2,
|
|
155
|
+
elevation: 2,
|
|
156
|
+
justifyContent: "center",
|
|
157
|
+
},
|
|
158
|
+
iconStyle: {
|
|
159
|
+
fontSize: 16,
|
|
160
|
+
alignSelf: "center",
|
|
161
|
+
},
|
|
162
|
+
sectionTitleContainer: {
|
|
163
|
+
height: 30,
|
|
164
|
+
paddingHorizontal: 16,
|
|
165
|
+
paddingBottom: 8,
|
|
166
|
+
justifyContent: "center",
|
|
167
|
+
},
|
|
168
|
+
sectionTitle: {
|
|
169
|
+
fontSize: 16,
|
|
170
|
+
fontFamily: "sf-semibold",
|
|
171
|
+
color: TEXT_DARK,
|
|
172
|
+
},
|
|
145
173
|
};
|
|
146
174
|
|
|
147
|
-
const mapStateToProps = state => {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
175
|
+
const mapStateToProps = (state) => {
|
|
176
|
+
return {
|
|
177
|
+
user: state.user,
|
|
178
|
+
colourBrandingMain: getMainBrandingColourFromState(state),
|
|
179
|
+
};
|
|
152
180
|
};
|
|
153
181
|
|
|
154
182
|
export default connect(mapStateToProps, {})(GroupInvite);
|