@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.
Files changed (130) hide show
  1. package/dist/module/actions/ChatActions.js +81 -0
  2. package/dist/module/actions/ChatActions.js.map +1 -0
  3. package/dist/module/actions/GroupActions.js +335 -0
  4. package/dist/module/actions/GroupActions.js.map +1 -0
  5. package/dist/module/actions/index.js +41 -0
  6. package/dist/module/actions/index.js.map +1 -0
  7. package/dist/module/actions/types.js +26 -0
  8. package/dist/module/actions/types.js.map +1 -0
  9. package/dist/module/assets/fonts.js +3 -0
  10. package/dist/module/assets/fonts.js.map +1 -0
  11. package/dist/module/components/chat/Chat.js +613 -0
  12. package/dist/module/components/chat/Chat.js.map +1 -0
  13. package/dist/module/components/chat/ChatList.js +557 -0
  14. package/dist/module/components/chat/ChatList.js.map +1 -0
  15. package/dist/module/components/chat/ContactsList.js +204 -0
  16. package/dist/module/components/chat/ContactsList.js.map +1 -0
  17. package/dist/module/components/chat/KioskPeoplePage.js +345 -0
  18. package/dist/module/components/chat/KioskPeoplePage.js.map +1 -0
  19. package/dist/module/components/chat/PeopleContainer.js +24 -0
  20. package/dist/module/components/chat/PeopleContainer.js.map +1 -0
  21. package/dist/module/components/chat/PeoplePage.js +438 -0
  22. package/dist/module/components/chat/PeoplePage.js.map +1 -0
  23. package/dist/module/components/common/index.js +26 -0
  24. package/dist/module/components/common/index.js.map +1 -0
  25. package/dist/module/components/events/EventInvitePopup.js +563 -0
  26. package/dist/module/components/events/EventInvitePopup.js.map +1 -0
  27. package/dist/module/components/groups/EditGroup.js +548 -0
  28. package/dist/module/components/groups/EditGroup.js.map +1 -0
  29. package/dist/module/components/groups/GroupDetails.js +388 -0
  30. package/dist/module/components/groups/GroupDetails.js.map +1 -0
  31. package/dist/module/components/groups/GroupsList.js +111 -0
  32. package/dist/module/components/groups/GroupsList.js.map +1 -0
  33. package/dist/module/components/groups/GroupsWidget.js +150 -0
  34. package/dist/module/components/groups/GroupsWidget.js.map +1 -0
  35. package/dist/module/components/groups/NewGroup.js +703 -0
  36. package/dist/module/components/groups/NewGroup.js.map +1 -0
  37. package/dist/module/components/groups/PublicGroup.js +131 -0
  38. package/dist/module/components/groups/PublicGroup.js.map +1 -0
  39. package/dist/module/components/groups/PublicGroupAction.js +296 -0
  40. package/dist/module/components/groups/PublicGroupAction.js.map +1 -0
  41. package/dist/module/components/notifications/GroupInvite.js +166 -0
  42. package/dist/module/components/notifications/GroupInvite.js.map +1 -0
  43. package/dist/module/components/notifications/GroupInviteAction.js +338 -0
  44. package/dist/module/components/notifications/GroupInviteAction.js.map +1 -0
  45. package/dist/module/components/notifications/GroupMessage.js +131 -0
  46. package/dist/module/components/notifications/GroupMessage.js.map +1 -0
  47. package/dist/module/components/takeover/TakeoverBackground.js +27 -0
  48. package/dist/module/components/takeover/TakeoverBackground.js.map +1 -0
  49. package/dist/module/config/index.js +9 -0
  50. package/dist/module/config/index.js.map +1 -0
  51. package/dist/module/core.config.js +17 -0
  52. package/dist/module/core.config.js.map +1 -0
  53. package/dist/module/feature.config.js +266 -0
  54. package/dist/module/feature.config.js.map +1 -0
  55. package/dist/module/index.js +27 -0
  56. package/dist/module/index.js.map +1 -0
  57. package/dist/module/js/Colors.js +17 -0
  58. package/dist/module/js/Colors.js.map +1 -0
  59. package/dist/module/js/NavigationService.js +8 -0
  60. package/dist/module/js/NavigationService.js.map +1 -0
  61. package/dist/module/js/Styles.js +3 -0
  62. package/dist/module/js/Styles.js.map +1 -0
  63. package/dist/module/js/circles/MapStateToDirectMessages.js +11 -0
  64. package/dist/module/js/circles/MapStateToDirectMessages.js.map +1 -0
  65. package/dist/module/js/index.js +21 -0
  66. package/dist/module/js/index.js.map +1 -0
  67. package/dist/module/reducers/ChatsReducer.js +82 -0
  68. package/dist/module/reducers/ChatsReducer.js.map +1 -0
  69. package/dist/module/reducers/GroupsReducer.js +174 -0
  70. package/dist/module/reducers/GroupsReducer.js.map +1 -0
  71. package/dist/module/reducers/reducerKeys.js +4 -0
  72. package/dist/module/reducers/reducerKeys.js.map +1 -0
  73. package/dist/module/values.config.default.js +33 -0
  74. package/dist/module/values.config.default.js.map +1 -0
  75. package/dist/module/values.config.groups.js +33 -0
  76. package/dist/module/values.config.groups.js.map +1 -0
  77. package/dist/module/values.config.js +33 -0
  78. package/dist/module/values.config.js.map +1 -0
  79. package/dist/module/webapi/circleActions.js +127 -0
  80. package/dist/module/webapi/circleActions.js.map +1 -0
  81. package/dist/module/webapi/helper.js +4 -0
  82. package/dist/module/webapi/helper.js.map +1 -0
  83. package/dist/module/webapi/index.js +7 -0
  84. package/dist/module/webapi/index.js.map +1 -0
  85. package/dist/module/webapi/messageActions.js +45 -0
  86. package/dist/module/webapi/messageActions.js.map +1 -0
  87. package/package.json +55 -0
  88. package/src/actions/ChatActions.js +92 -0
  89. package/src/actions/GroupActions.js +368 -0
  90. package/src/actions/index.js +43 -0
  91. package/src/actions/types.js +29 -0
  92. package/src/assets/fonts.js +3 -0
  93. package/src/components/chat/Chat.js +568 -0
  94. package/src/components/chat/ChatList.js +491 -0
  95. package/src/components/chat/ContactsList.js +168 -0
  96. package/src/components/chat/KioskPeoplePage.js +317 -0
  97. package/src/components/chat/PeopleContainer.js +21 -0
  98. package/src/components/chat/PeoplePage.js +418 -0
  99. package/src/components/common/index.js +26 -0
  100. package/src/components/events/EventInvitePopup.js +508 -0
  101. package/src/components/groups/EditGroup.js +486 -0
  102. package/src/components/groups/GroupDetails.js +335 -0
  103. package/src/components/groups/GroupsList.js +93 -0
  104. package/src/components/groups/GroupsWidget.js +134 -0
  105. package/src/components/groups/NewGroup.js +650 -0
  106. package/src/components/groups/PublicGroup.js +116 -0
  107. package/src/components/groups/PublicGroupAction.js +266 -0
  108. package/src/components/notifications/GroupInvite.js +154 -0
  109. package/src/components/notifications/GroupInviteAction.js +295 -0
  110. package/src/components/notifications/GroupMessage.js +114 -0
  111. package/src/components/takeover/TakeoverBackground.js +26 -0
  112. package/src/config/index.js +9 -0
  113. package/src/core.config.js +5 -0
  114. package/src/feature.config.js +274 -0
  115. package/src/index.js +24 -0
  116. package/src/js/Colors.js +17 -0
  117. package/src/js/NavigationService.js +9 -0
  118. package/src/js/Styles.js +3 -0
  119. package/src/js/circles/MapStateToDirectMessages.js +10 -0
  120. package/src/js/index.js +24 -0
  121. package/src/reducers/ChatsReducer.js +63 -0
  122. package/src/reducers/GroupsReducer.js +142 -0
  123. package/src/reducers/reducerKeys.js +4 -0
  124. package/src/values.config.default.js +39 -0
  125. package/src/values.config.groups.js +39 -0
  126. package/src/values.config.js +39 -0
  127. package/src/webapi/circleActions.js +104 -0
  128. package/src/webapi/helper.js +4 -0
  129. package/src/webapi/index.js +8 -0
  130. 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,4 @@
1
+ import { Helper } from '../core.config';
2
+
3
+ export const getUrl = Helper.getUrl;
4
+ export const getAuthTokenHeader = Helper.getAuthTokenHeader;
@@ -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
+ };