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