@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.
Files changed (133) hide show
  1. package/dist/module/actions/ChatActions.js +3 -3
  2. package/dist/module/actions/ChatActions.js.map +1 -1
  3. package/dist/module/actions/GroupActions.js +18 -18
  4. package/dist/module/actions/GroupActions.js.map +1 -1
  5. package/dist/module/actions/index.js +3 -3
  6. package/dist/module/actions/index.js.map +1 -1
  7. package/dist/module/actions/types.js +2 -2
  8. package/dist/module/actions/types.js.map +1 -1
  9. package/dist/module/assets/fonts.js +1 -1
  10. package/dist/module/assets/fonts.js.map +1 -1
  11. package/dist/module/components/chat/Chat.js +83 -101
  12. package/dist/module/components/chat/Chat.js.map +1 -1
  13. package/dist/module/components/chat/ChatList.js +49 -49
  14. package/dist/module/components/chat/ChatList.js.map +1 -1
  15. package/dist/module/components/chat/ContactsList.js +21 -21
  16. package/dist/module/components/chat/ContactsList.js.map +1 -1
  17. package/dist/module/components/chat/KioskPeoplePage.js +38 -37
  18. package/dist/module/components/chat/KioskPeoplePage.js.map +1 -1
  19. package/dist/module/components/chat/PeopleContainer.js +5 -5
  20. package/dist/module/components/chat/PeopleContainer.js.map +1 -1
  21. package/dist/module/components/chat/PeoplePage.js +41 -41
  22. package/dist/module/components/chat/PeoplePage.js.map +1 -1
  23. package/dist/module/components/common/SwipeableUserListing.js +22 -22
  24. package/dist/module/components/common/SwipeableUserListing.js.map +1 -1
  25. package/dist/module/components/common/index.js +2 -2
  26. package/dist/module/components/common/index.js.map +1 -1
  27. package/dist/module/components/events/EventInvitePopup.js +40 -40
  28. package/dist/module/components/events/EventInvitePopup.js.map +1 -1
  29. package/dist/module/components/groups/EditGroup.js +62 -62
  30. package/dist/module/components/groups/EditGroup.js.map +1 -1
  31. package/dist/module/components/groups/GroupDetails.js +32 -32
  32. package/dist/module/components/groups/GroupDetails.js.map +1 -1
  33. package/dist/module/components/groups/GroupsList.js +10 -10
  34. package/dist/module/components/groups/GroupsList.js.map +1 -1
  35. package/dist/module/components/groups/GroupsWidget.js +18 -18
  36. package/dist/module/components/groups/GroupsWidget.js.map +1 -1
  37. package/dist/module/components/groups/NewGroup.js +101 -101
  38. package/dist/module/components/groups/NewGroup.js.map +1 -1
  39. package/dist/module/components/groups/PublicGroup.js +17 -17
  40. package/dist/module/components/groups/PublicGroup.js.map +1 -1
  41. package/dist/module/components/groups/PublicGroupAction.js +39 -39
  42. package/dist/module/components/groups/PublicGroupAction.js.map +1 -1
  43. package/dist/module/components/notifications/GroupInvite.js +25 -25
  44. package/dist/module/components/notifications/GroupInvite.js.map +1 -1
  45. package/dist/module/components/notifications/GroupInviteAction.js +44 -44
  46. package/dist/module/components/notifications/GroupInviteAction.js.map +1 -1
  47. package/dist/module/components/notifications/GroupMessage.js +17 -17
  48. package/dist/module/components/notifications/GroupMessage.js.map +1 -1
  49. package/dist/module/components/takeover/TakeoverBackground.js +5 -5
  50. package/dist/module/components/takeover/TakeoverBackground.js.map +1 -1
  51. package/dist/module/config/index.js +2 -2
  52. package/dist/module/config/index.js.map +1 -1
  53. package/dist/module/core.config.js +1 -1
  54. package/dist/module/core.config.js.map +1 -1
  55. package/dist/module/feature.config.js +27 -27
  56. package/dist/module/feature.config.js.map +1 -1
  57. package/dist/module/index.js +14 -14
  58. package/dist/module/index.js.map +1 -1
  59. package/dist/module/js/Colors.js +1 -1
  60. package/dist/module/js/Colors.js.map +1 -1
  61. package/dist/module/js/NavigationService.js +1 -1
  62. package/dist/module/js/NavigationService.js.map +1 -1
  63. package/dist/module/js/Styles.js +1 -1
  64. package/dist/module/js/Styles.js.map +1 -1
  65. package/dist/module/js/circles/MapStateToDirectMessages.js +2 -2
  66. package/dist/module/js/circles/MapStateToDirectMessages.js.map +1 -1
  67. package/dist/module/js/index.js +3 -3
  68. package/dist/module/js/index.js.map +1 -1
  69. package/dist/module/reducers/ChatsReducer.js +4 -4
  70. package/dist/module/reducers/ChatsReducer.js.map +1 -1
  71. package/dist/module/reducers/GroupsReducer.js +5 -5
  72. package/dist/module/reducers/GroupsReducer.js.map +1 -1
  73. package/dist/module/reducers/reducerKeys.js +1 -1
  74. package/dist/module/reducers/reducerKeys.js.map +1 -1
  75. package/dist/module/values.config.default.js +25 -25
  76. package/dist/module/values.config.default.js.map +1 -1
  77. package/dist/module/values.config.groups.js +25 -25
  78. package/dist/module/values.config.groups.js.map +1 -1
  79. package/dist/module/values.config.js +25 -25
  80. package/dist/module/values.config.js.map +1 -1
  81. package/dist/module/webapi/circleActions.js +31 -31
  82. package/dist/module/webapi/circleActions.js.map +1 -1
  83. package/dist/module/webapi/helper.js +1 -1
  84. package/dist/module/webapi/helper.js.map +1 -1
  85. package/dist/module/webapi/index.js +3 -3
  86. package/dist/module/webapi/index.js.map +1 -1
  87. package/dist/module/webapi/messageActions.js +10 -10
  88. package/dist/module/webapi/messageActions.js.map +1 -1
  89. package/package.json +54 -54
  90. package/src/actions/ChatActions.js +55 -55
  91. package/src/actions/GroupActions.js +245 -237
  92. package/src/actions/index.js +3 -3
  93. package/src/actions/types.js +2 -2
  94. package/src/assets/fonts.js +1 -1
  95. package/src/components/chat/Chat.js +730 -669
  96. package/src/components/chat/ChatList.js +603 -512
  97. package/src/components/chat/ContactsList.js +186 -169
  98. package/src/components/chat/KioskPeoplePage.js +315 -291
  99. package/src/components/chat/PeopleContainer.js +14 -14
  100. package/src/components/chat/PeoplePage.js +450 -383
  101. package/src/components/common/SwipeableUserListing.js +118 -106
  102. package/src/components/common/index.js +2 -2
  103. package/src/components/events/EventInvitePopup.js +587 -505
  104. package/src/components/groups/EditGroup.js +607 -538
  105. package/src/components/groups/GroupDetails.js +385 -305
  106. package/src/components/groups/GroupsList.js +91 -79
  107. package/src/components/groups/GroupsWidget.js +122 -116
  108. package/src/components/groups/NewGroup.js +758 -639
  109. package/src/components/groups/PublicGroup.js +129 -101
  110. package/src/components/groups/PublicGroupAction.js +312 -244
  111. package/src/components/notifications/GroupInvite.js +167 -139
  112. package/src/components/notifications/GroupInviteAction.js +371 -273
  113. package/src/components/notifications/GroupMessage.js +110 -102
  114. package/src/components/takeover/TakeoverBackground.js +24 -18
  115. package/src/config/index.js +4 -4
  116. package/src/core.config.js +27 -3
  117. package/src/feature.config.js +257 -245
  118. package/src/index.js +24 -21
  119. package/src/js/Colors.js +5 -3
  120. package/src/js/NavigationService.js +5 -4
  121. package/src/js/Styles.js +1 -1
  122. package/src/js/circles/MapStateToDirectMessages.js +6 -6
  123. package/src/js/index.js +3 -3
  124. package/src/reducers/ChatsReducer.js +66 -53
  125. package/src/reducers/GroupsReducer.js +203 -190
  126. package/src/reducers/reducerKeys.js +1 -1
  127. package/src/values.config.default.js +29 -29
  128. package/src/values.config.groups.js +29 -29
  129. package/src/values.config.js +29 -29
  130. package/src/webapi/circleActions.js +109 -109
  131. package/src/webapi/helper.js +1 -1
  132. package/src/webapi/index.js +3 -3
  133. package/src/webapi/messageActions.js +47 -47
@@ -1,154 +1,182 @@
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 { TEXT_LIGHT, TEXT_DARK, getFirstName, getMainBrandingColourFromState } from '../../js';
6
- import { Pl60Icon } from '../../assets/fonts';
7
- import GroupInviteAction from './GroupInviteAction';
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
- constructor(props) {
11
- super(props);
12
- this.state = {
13
- event: {},
14
- showingAction: false,
15
- };
16
- }
15
+ constructor(props) {
16
+ super(props);
17
+ this.state = {
18
+ event: {},
19
+ showingAction: false,
20
+ };
21
+ }
17
22
 
18
- UNSAFE_componentWillMount() {
19
- this.setState({ event: this.props.event });
20
- }
23
+ UNSAFE_componentWillMount() {
24
+ this.setState({ event: this.props.event });
25
+ }
21
26
 
22
- onPressEvent() {
23
- this.setState({ showingAction: true });
24
- }
27
+ onPressEvent() {
28
+ this.setState({ showingAction: true });
29
+ }
25
30
 
26
- getShortName(name) {
27
- if (!name) {
28
- return name;
29
- }
30
- const names = name.split(',')[0].match(/\b\w/g);
31
- return names && names.length > 0 ? `${names[0]}${names.length > 1 ? names[names.length - 1] : ''}` : '';
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
- renderInviteAction() {
35
- return (
36
- <GroupInviteAction
37
- group={this.state.event}
38
- onClose={() => {
39
- this.setState({ showingAction: false });
40
- }}
41
- showingAction={this.state.showingAction}
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
- render() {
47
- if (_.isEmpty(this.state.event)) {
48
- return null;
49
- }
50
- return (
51
- <View>
52
- {this.renderInviteAction()}
53
- {this.props.showHeader && (
54
- <View style={styles.sectionTitleContainer}>
55
- <Text style={styles.sectionTitle} allowFontScaling={false}>
56
- {this.props.index === 0 ? 'Invitations' : ''}
57
- </Text>
58
- </View>
59
- )}
60
- <TouchableOpacity onPress={this.onPressEvent.bind(this)} style={[styles.inviteCard, this.props.index === 0 && { marginLeft: 16 }]}>
61
- <ImageBackground
62
- style={[styles.inviteImage, { backgroundColor: this.props.colourBrandingMain, justifyContent: 'center', alignItems: 'center' }]}
63
- imageStyle={{ borderRadius: 5 }}
64
- source={this.state.event.Image && { uri: this.state.event.Image }}
65
- >
66
- {!this.state.event.Image && this.state.event.Title && (
67
- <Text style={styles.groupText}>{this.getShortName(this.state.event.Title)}</Text>
68
- )}
69
- <View style={styles.iconWrapper}>
70
- <Pl60Icon name="friends" style={[styles.iconStyle, { color: this.props.colourBrandingMain }]} />
71
- </View>
72
- </ImageBackground>
73
- <View>
74
- <Text numberOfLines={1} style={styles.inviteTitle}>
75
- {this.state.event.Title}
76
- </Text>
77
- <Text numberOfLines={1} style={styles.inviteText}>
78
- {`${getFirstName(this.props.invite.InvitedBy)} invited you`}
79
- </Text>
80
- </View>
81
- </TouchableOpacity>
82
- </View>
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
- inviteCard: {
89
- width: 125,
90
- marginRight: 28,
91
- },
92
- inviteImage: {
93
- height: 125,
94
- width: 125,
95
- borderRadius: 5,
96
- },
97
- inviteTitle: {
98
- marginTop: 8,
99
- fontFamily: 'sf-semibold',
100
- fontSize: 14,
101
- lineHeight: 16,
102
- color: TEXT_DARK,
103
- backgroundColor: 'transparent',
104
- },
105
- inviteText: {
106
- fontFamily: 'sf-regular',
107
- fontSize: 12,
108
- lineHeight: 16,
109
- color: TEXT_LIGHT,
110
- backgroundColor: 'transparent',
111
- },
112
- groupText: {
113
- fontFamily: 'sf-semibold',
114
- fontSize: 24,
115
- color: '#fff',
116
- backgroundColor: 'transparent',
117
- },
118
- iconWrapper: {
119
- height: 24,
120
- width: 24,
121
- backgroundColor: '#fff',
122
- borderRadius: 12,
123
- position: 'absolute',
124
- bottom: 5,
125
- right: 5,
126
- zIndex: 2,
127
- elevation: 2,
128
- justifyContent: 'center',
129
- },
130
- iconStyle: {
131
- fontSize: 16,
132
- alignSelf: 'center',
133
- },
134
- sectionTitleContainer: {
135
- height: 30,
136
- paddingHorizontal: 16,
137
- paddingBottom: 8,
138
- justifyContent: 'center',
139
- },
140
- sectionTitle: {
141
- fontSize: 16,
142
- fontFamily: 'sf-semibold',
143
- color: TEXT_DARK,
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
- return {
149
- user: state.user,
150
- colourBrandingMain: getMainBrandingColourFromState(state),
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);