@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,114 +1,122 @@
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';
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
- 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
- };
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
- 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
- };
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
- render() {
48
- const { message, index } = this.props;
47
+ render() {
48
+ const { message, index } = this.props;
49
49
 
50
- const chatImage = this.getChatImage(message);
51
- return (
52
- <View key={index} style={styles.notifWrapper}>
53
- <TouchableOpacity activeOpacity={0.9} onPress={() => this.onPressChat(message)}>
54
- <View style={styles.notifInner}>
55
- <View
56
- style={{
57
- marginRight: 16,
58
- }}
59
- >
60
- <ProfilePic Diameter={40} ProfilePic={chatImage} />
61
- </View>
62
- <View style={{ flex: 1 }}>
63
- <Text style={styles.notifInner_title}>
64
- {message.Title
65
- ? `New message in ${message.Title}`
66
- : `Message from ${message?.lastMessage?.user?.name ? message.lastMessage.user.name : ''}`}
67
- </Text>
68
- <Text style={styles.notifInner_text}>
69
- {message.isPrivate
70
- ? `${message.lastMessage?.text || ''}`.substring(0, 150)
71
- : `${getFirstName(message.lastMessage?.user?.name || 'Someone')} posted: ${message.lastMessage?.text || ''}`.substring(0, 100)}
72
- </Text>
73
- </View>
74
- </View>
75
- </TouchableOpacity>
76
- </View>
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
- notifWrapper: {
83
- width: '100%',
84
- padding: 16,
85
- paddingBottom: 0,
86
- backgroundColor: '#fff',
87
- },
88
- notifInner: {
89
- paddingBottom: 16,
90
- flexDirection: 'row',
91
- borderBottomWidth: 1,
92
- borderBottomColor: 'rgb(235, 239, 242)',
93
- },
94
- notifInner_title: {
95
- fontSize: 14,
96
- fontFamily: 'sf-semibold',
97
- color: TEXT_DARK,
98
- },
99
- notifInner_text: {
100
- marginTop: 4,
101
- fontSize: 12,
102
- lineHeight: 14,
103
- fontFamily: 'sf-regular',
104
- color: TEXT_LIGHT,
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
- return {
110
- user: state.user,
111
- };
114
+ const mapStateToProps = (state) => {
115
+ return {
116
+ user: state.user,
117
+ };
112
118
  };
113
119
 
114
- export default connect(mapStateToProps, { updateNavRead, clearGroupCounter })(GroupMessage);
120
+ export default connect(mapStateToProps, { updateNavRead, clearGroupCounter })(
121
+ GroupMessage,
122
+ );
@@ -1,26 +1,32 @@
1
- import React, { PureComponent } from 'react';
2
- import { View } from 'react-native';
1
+ import React, { PureComponent } from "react";
2
+ import { View } from "react-native";
3
3
 
4
4
  class TakeoverBackground extends PureComponent {
5
- render() {
6
- return (
7
- <View style={[styles.container, this.props.style, this.props.colour && { backgroundColor: this.props.colour }]}>
8
- {this.props.children}
9
- </View>
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
- container: {
16
- flex: 1,
17
- position: 'relative',
18
- backgroundColor: '#fff',
19
- },
20
- image: {
21
- flex: 1,
22
- position: 'relative',
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;
@@ -1,9 +1,9 @@
1
- import { Config } from '../core.config';
2
- import { values } from '../values.config';
1
+ import { Config } from "../core.config";
2
+ import { values } from "../values.config";
3
3
 
4
4
  export const CONST_STRINGS = {
5
- EMPTY_GROUPS: values.textEmptyGroups,
6
- EMPTY_PEOPLE: values.textEmptyPeople,
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;
@@ -1,5 +1,29 @@
1
1
  // import * as PlussCore from '../../pluss-core/src';
2
- import * as PlussCore from '@plusscommunities/pluss-core-app';
2
+ import * as PlussCore from "@plusscommunities/pluss-core-app";
3
3
 
4
- const { Apis, Fonts, Actions, ActionTypes, Config, Components, Styles, Session, Helper, Constants, Colours } = PlussCore;
5
- export { Apis, Fonts, Actions, ActionTypes, Config, Components, Styles, Session, Helper, Constants, Colours };
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
+ };