@plusscommunities/pluss-circles-app-groups 1.2.2-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 +81 -0
- package/dist/module/actions/ChatActions.js.map +1 -0
- package/dist/module/actions/GroupActions.js +335 -0
- package/dist/module/actions/GroupActions.js.map +1 -0
- package/dist/module/actions/index.js +41 -0
- package/dist/module/actions/index.js.map +1 -0
- package/dist/module/actions/types.js +26 -0
- package/dist/module/actions/types.js.map +1 -0
- package/dist/module/assets/fonts.js +3 -0
- package/dist/module/assets/fonts.js.map +1 -0
- package/dist/module/components/chat/Chat.js +613 -0
- package/dist/module/components/chat/Chat.js.map +1 -0
- package/dist/module/components/chat/ChatList.js +557 -0
- package/dist/module/components/chat/ChatList.js.map +1 -0
- package/dist/module/components/chat/ContactsList.js +204 -0
- package/dist/module/components/chat/ContactsList.js.map +1 -0
- package/dist/module/components/chat/KioskPeoplePage.js +345 -0
- package/dist/module/components/chat/KioskPeoplePage.js.map +1 -0
- package/dist/module/components/chat/PeopleContainer.js +24 -0
- package/dist/module/components/chat/PeopleContainer.js.map +1 -0
- package/dist/module/components/chat/PeoplePage.js +438 -0
- package/dist/module/components/chat/PeoplePage.js.map +1 -0
- package/dist/module/components/common/index.js +26 -0
- package/dist/module/components/common/index.js.map +1 -0
- package/dist/module/components/events/EventInvitePopup.js +563 -0
- package/dist/module/components/events/EventInvitePopup.js.map +1 -0
- package/dist/module/components/groups/EditGroup.js +548 -0
- package/dist/module/components/groups/EditGroup.js.map +1 -0
- package/dist/module/components/groups/GroupDetails.js +388 -0
- package/dist/module/components/groups/GroupDetails.js.map +1 -0
- package/dist/module/components/groups/GroupsList.js +111 -0
- package/dist/module/components/groups/GroupsList.js.map +1 -0
- package/dist/module/components/groups/GroupsWidget.js +150 -0
- package/dist/module/components/groups/GroupsWidget.js.map +1 -0
- package/dist/module/components/groups/NewGroup.js +703 -0
- package/dist/module/components/groups/NewGroup.js.map +1 -0
- package/dist/module/components/groups/PublicGroup.js +131 -0
- package/dist/module/components/groups/PublicGroup.js.map +1 -0
- package/dist/module/components/groups/PublicGroupAction.js +296 -0
- package/dist/module/components/groups/PublicGroupAction.js.map +1 -0
- package/dist/module/components/notifications/GroupInvite.js +166 -0
- package/dist/module/components/notifications/GroupInvite.js.map +1 -0
- package/dist/module/components/notifications/GroupInviteAction.js +338 -0
- package/dist/module/components/notifications/GroupInviteAction.js.map +1 -0
- package/dist/module/components/notifications/GroupMessage.js +131 -0
- package/dist/module/components/notifications/GroupMessage.js.map +1 -0
- package/dist/module/components/takeover/TakeoverBackground.js +27 -0
- package/dist/module/components/takeover/TakeoverBackground.js.map +1 -0
- package/dist/module/config/index.js +9 -0
- package/dist/module/config/index.js.map +1 -0
- package/dist/module/core.config.js +17 -0
- package/dist/module/core.config.js.map +1 -0
- package/dist/module/feature.config.js +266 -0
- package/dist/module/feature.config.js.map +1 -0
- package/dist/module/index.js +27 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/js/Colors.js +17 -0
- package/dist/module/js/Colors.js.map +1 -0
- package/dist/module/js/NavigationService.js +8 -0
- package/dist/module/js/NavigationService.js.map +1 -0
- package/dist/module/js/Styles.js +3 -0
- package/dist/module/js/Styles.js.map +1 -0
- package/dist/module/js/circles/MapStateToDirectMessages.js +11 -0
- package/dist/module/js/circles/MapStateToDirectMessages.js.map +1 -0
- package/dist/module/js/index.js +21 -0
- package/dist/module/js/index.js.map +1 -0
- package/dist/module/reducers/ChatsReducer.js +82 -0
- package/dist/module/reducers/ChatsReducer.js.map +1 -0
- package/dist/module/reducers/GroupsReducer.js +174 -0
- package/dist/module/reducers/GroupsReducer.js.map +1 -0
- package/dist/module/reducers/reducerKeys.js +4 -0
- package/dist/module/reducers/reducerKeys.js.map +1 -0
- package/dist/module/values.config.default.js +33 -0
- package/dist/module/values.config.default.js.map +1 -0
- package/dist/module/values.config.groups.js +33 -0
- package/dist/module/values.config.groups.js.map +1 -0
- package/dist/module/values.config.js +33 -0
- package/dist/module/values.config.js.map +1 -0
- package/dist/module/webapi/circleActions.js +127 -0
- package/dist/module/webapi/circleActions.js.map +1 -0
- package/dist/module/webapi/helper.js +4 -0
- package/dist/module/webapi/helper.js.map +1 -0
- package/dist/module/webapi/index.js +7 -0
- package/dist/module/webapi/index.js.map +1 -0
- package/dist/module/webapi/messageActions.js +45 -0
- package/dist/module/webapi/messageActions.js.map +1 -0
- package/package.json +55 -0
- package/src/actions/ChatActions.js +92 -0
- package/src/actions/GroupActions.js +368 -0
- package/src/actions/index.js +43 -0
- package/src/actions/types.js +29 -0
- package/src/assets/fonts.js +3 -0
- package/src/components/chat/Chat.js +568 -0
- package/src/components/chat/ChatList.js +491 -0
- package/src/components/chat/ContactsList.js +168 -0
- package/src/components/chat/KioskPeoplePage.js +317 -0
- package/src/components/chat/PeopleContainer.js +21 -0
- package/src/components/chat/PeoplePage.js +418 -0
- package/src/components/common/index.js +26 -0
- package/src/components/events/EventInvitePopup.js +508 -0
- package/src/components/groups/EditGroup.js +486 -0
- package/src/components/groups/GroupDetails.js +335 -0
- package/src/components/groups/GroupsList.js +93 -0
- package/src/components/groups/GroupsWidget.js +134 -0
- package/src/components/groups/NewGroup.js +650 -0
- package/src/components/groups/PublicGroup.js +116 -0
- package/src/components/groups/PublicGroupAction.js +266 -0
- package/src/components/notifications/GroupInvite.js +154 -0
- package/src/components/notifications/GroupInviteAction.js +295 -0
- package/src/components/notifications/GroupMessage.js +114 -0
- package/src/components/takeover/TakeoverBackground.js +26 -0
- package/src/config/index.js +9 -0
- package/src/core.config.js +5 -0
- package/src/feature.config.js +274 -0
- package/src/index.js +24 -0
- package/src/js/Colors.js +17 -0
- package/src/js/NavigationService.js +9 -0
- package/src/js/Styles.js +3 -0
- package/src/js/circles/MapStateToDirectMessages.js +10 -0
- package/src/js/index.js +24 -0
- package/src/reducers/ChatsReducer.js +63 -0
- package/src/reducers/GroupsReducer.js +142 -0
- package/src/reducers/reducerKeys.js +4 -0
- package/src/values.config.default.js +39 -0
- package/src/values.config.groups.js +39 -0
- package/src/values.config.js +39 -0
- package/src/webapi/circleActions.js +104 -0
- package/src/webapi/helper.js +4 -0
- package/src/webapi/index.js +8 -0
- package/src/webapi/messageActions.js +39 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { values } from '../values.config';
|
|
2
|
+
import { getUrl } from './helper';
|
|
3
|
+
import { authedFunction } from '../js';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
add: (site, title, image, audience, isPublic) => {
|
|
7
|
+
return authedFunction({
|
|
8
|
+
method: 'POST',
|
|
9
|
+
url: getUrl(values.serviceKey, 'update/add'),
|
|
10
|
+
data: {
|
|
11
|
+
site,
|
|
12
|
+
title,
|
|
13
|
+
image,
|
|
14
|
+
audience,
|
|
15
|
+
isPublic,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
getDirect: (site, userId) => {
|
|
20
|
+
return authedFunction({
|
|
21
|
+
method: 'GET',
|
|
22
|
+
url: getUrl(values.serviceKey, 'get/direct', { site, userId }),
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
getFiles: circleId => {
|
|
26
|
+
return authedFunction({
|
|
27
|
+
method: 'GET',
|
|
28
|
+
url: getUrl(values.serviceKey, 'get/files', { circleId }),
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
getImages: circleId => {
|
|
32
|
+
return authedFunction({
|
|
33
|
+
method: 'GET',
|
|
34
|
+
url: getUrl(values.serviceKey, 'get/images', { circleId }),
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
clearGroupUnread: async (groupID, userID) => {
|
|
38
|
+
return authedFunction({
|
|
39
|
+
method: 'POST',
|
|
40
|
+
url: getUrl(values.serviceKey, 'resetunread'),
|
|
41
|
+
data: { groupID, userID },
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
createGroup: async group => {
|
|
45
|
+
return authedFunction({
|
|
46
|
+
method: 'POST',
|
|
47
|
+
url: getUrl(values.serviceKey, 'createNewGroup'),
|
|
48
|
+
data: { group },
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
getGroups: async () => {
|
|
52
|
+
return authedFunction({
|
|
53
|
+
method: 'POST',
|
|
54
|
+
url: getUrl(values.serviceKey, 'getUsersGroups'),
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
getGroupInvites: async (UserID, token) => {
|
|
58
|
+
return authedFunction({
|
|
59
|
+
method: 'POST',
|
|
60
|
+
url: getUrl(values.serviceKey, 'getGroupInvites'),
|
|
61
|
+
data: { UserID },
|
|
62
|
+
headers: { authorization: token },
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
inviteUserToGroup: async (group, userID, userName, invites) => {
|
|
66
|
+
return authedFunction({
|
|
67
|
+
method: 'POST',
|
|
68
|
+
url: getUrl(values.serviceKey, 'inviteToGroup'),
|
|
69
|
+
data: { group, invites },
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
muteGroup: async groupID => {
|
|
73
|
+
return authedFunction({
|
|
74
|
+
method: 'POST',
|
|
75
|
+
url: getUrl(values.serviceKey, 'muteGroup'),
|
|
76
|
+
data: { groupID },
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
actionGroupInvite: async (invite, action) => {
|
|
80
|
+
return authedFunction({
|
|
81
|
+
method: 'POST',
|
|
82
|
+
url: getUrl(values.serviceKey, 'handleGroupInvite'),
|
|
83
|
+
data: {
|
|
84
|
+
inviteID: invite.Id,
|
|
85
|
+
action,
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
getPublicGroups: async site => {
|
|
90
|
+
return authedFunction({
|
|
91
|
+
method: 'GET',
|
|
92
|
+
url: getUrl(values.serviceKey, 'getpublic', { site }),
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
joinGroup: async groupId => {
|
|
96
|
+
return authedFunction({
|
|
97
|
+
method: 'POST',
|
|
98
|
+
url: getUrl(values.serviceKey, 'join'),
|
|
99
|
+
data: {
|
|
100
|
+
groupId,
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Apis } from '../core.config';
|
|
2
|
+
|
|
3
|
+
export const userActions = Apis.userActions;
|
|
4
|
+
export const contactActions = Apis.contactActions;
|
|
5
|
+
export const eventActions = Apis.eventActions;
|
|
6
|
+
|
|
7
|
+
export { default as circleActions } from './circleActions';
|
|
8
|
+
export * from './messageActions';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import { values } from '../values.config';
|
|
3
|
+
import { getUrl, getAuthTokenHeader } from './helper';
|
|
4
|
+
import { authedFunction } from '../js';
|
|
5
|
+
|
|
6
|
+
export const messageActions = {
|
|
7
|
+
getMessages: async (groupId, limit, minTime, maxTime) => {
|
|
8
|
+
const query = { groupId };
|
|
9
|
+
if (!_.isUndefined(minTime)) {
|
|
10
|
+
query.minTime = minTime;
|
|
11
|
+
}
|
|
12
|
+
if (!_.isUndefined(maxTime)) {
|
|
13
|
+
query.maxTime = maxTime;
|
|
14
|
+
}
|
|
15
|
+
if (limit) {
|
|
16
|
+
query.limit = limit;
|
|
17
|
+
}
|
|
18
|
+
const request = {
|
|
19
|
+
method: 'GET',
|
|
20
|
+
url: getUrl(values.serviceKey, 'getMessages', query),
|
|
21
|
+
headers: {},
|
|
22
|
+
};
|
|
23
|
+
request.headers.authorization = await getAuthTokenHeader();
|
|
24
|
+
return authedFunction(request);
|
|
25
|
+
},
|
|
26
|
+
sendMessage: async (userID, chatKey, groupLast, message) => {
|
|
27
|
+
const request = {
|
|
28
|
+
method: 'post',
|
|
29
|
+
url: getUrl(values.serviceKey, 'sendMessage'),
|
|
30
|
+
data: {
|
|
31
|
+
groupId: chatKey,
|
|
32
|
+
message,
|
|
33
|
+
},
|
|
34
|
+
headers: {},
|
|
35
|
+
};
|
|
36
|
+
request.headers.authorization = await getAuthTokenHeader();
|
|
37
|
+
return authedFunction(request);
|
|
38
|
+
},
|
|
39
|
+
};
|