@plusscommunities/pluss-core-app 1.4.8 → 1.5.2

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 (186) hide show
  1. package/dist/module/actions/FollowerActions.js +34 -0
  2. package/dist/module/actions/FollowerActions.js.map +1 -0
  3. package/dist/module/actions/MediaActions.js +20 -0
  4. package/dist/module/actions/MediaActions.js.map +1 -0
  5. package/dist/module/actions/ResidentActions.js +26 -0
  6. package/dist/module/actions/ResidentActions.js.map +1 -0
  7. package/dist/module/actions/UserActions.js +214 -0
  8. package/dist/module/actions/UserActions.js.map +1 -0
  9. package/dist/module/actions/index.js +5 -0
  10. package/dist/module/actions/index.js.map +1 -0
  11. package/dist/module/actions/types.js +14 -0
  12. package/dist/module/actions/types.js.map +1 -0
  13. package/dist/module/apis/analyticsActions.js +20 -0
  14. package/dist/module/apis/analyticsActions.js.map +1 -0
  15. package/dist/module/apis/contactActions.js +27 -0
  16. package/dist/module/apis/contactActions.js.map +1 -0
  17. package/dist/module/apis/eventActions.js +163 -0
  18. package/dist/module/apis/eventActions.js.map +1 -0
  19. package/dist/module/apis/fileActions.js +96 -0
  20. package/dist/module/apis/fileActions.js.map +1 -0
  21. package/dist/module/apis/followerActions.js +38 -0
  22. package/dist/module/apis/followerActions.js.map +1 -0
  23. package/dist/module/apis/index.js +11 -0
  24. package/dist/module/apis/index.js.map +1 -0
  25. package/dist/module/apis/notificationActions.js +60 -0
  26. package/dist/module/apis/notificationActions.js.map +1 -0
  27. package/dist/module/apis/profileActions.js +14 -0
  28. package/dist/module/apis/profileActions.js.map +1 -0
  29. package/dist/module/apis/reactionActions.js +78 -0
  30. package/dist/module/apis/reactionActions.js.map +1 -0
  31. package/dist/module/apis/typeActions.js +15 -0
  32. package/dist/module/apis/typeActions.js.map +1 -0
  33. package/dist/module/apis/userActions.js +104 -0
  34. package/dist/module/apis/userActions.js.map +1 -0
  35. package/{assets → dist/module/assets}/icons/reactions/heart.png +0 -0
  36. package/{assets → dist/module/assets}/icons/reactions/party.png +0 -0
  37. package/{assets → dist/module/assets}/icons/reactions/sad.png +0 -0
  38. package/{assets → dist/module/assets}/icons/reactions/smile.png +0 -0
  39. package/dist/module/colours.js +149 -0
  40. package/dist/module/colours.js.map +1 -0
  41. package/dist/module/components/AddButton.js +45 -0
  42. package/dist/module/components/AddButton.js.map +1 -0
  43. package/dist/module/components/Attachment.js +59 -0
  44. package/dist/module/components/Attachment.js.map +1 -0
  45. package/dist/module/components/AudienceSelectorLauncher.js +70 -0
  46. package/dist/module/components/AudienceSelectorLauncher.js.map +1 -0
  47. package/dist/module/components/AudienceSelectorPage.js +376 -0
  48. package/dist/module/components/AudienceSelectorPage.js.map +1 -0
  49. package/dist/module/components/BackButton.js +62 -0
  50. package/dist/module/components/BackButton.js.map +1 -0
  51. package/dist/module/components/CategoryTabs.js +171 -0
  52. package/dist/module/components/CategoryTabs.js.map +1 -0
  53. package/dist/module/components/CommentReply.js +363 -0
  54. package/dist/module/components/CommentReply.js.map +1 -0
  55. package/dist/module/components/CommentSection.js +785 -0
  56. package/dist/module/components/CommentSection.js.map +1 -0
  57. package/dist/module/components/ConfirmPopup.js +85 -0
  58. package/dist/module/components/ConfirmPopup.js.map +1 -0
  59. package/dist/module/components/ConfirmationPopup.js +77 -0
  60. package/dist/module/components/ConfirmationPopup.js.map +1 -0
  61. package/dist/module/components/DropDownItem.js +82 -0
  62. package/dist/module/components/DropDownItem.js.map +1 -0
  63. package/dist/module/components/DropDownMenu.js +46 -0
  64. package/dist/module/components/DropDownMenu.js.map +1 -0
  65. package/dist/module/components/EmptyStateMain.js +50 -0
  66. package/dist/module/components/EmptyStateMain.js.map +1 -0
  67. package/dist/module/components/EmptyStateWidget.js +52 -0
  68. package/dist/module/components/EmptyStateWidget.js.map +1 -0
  69. package/dist/module/components/FontScaleButton.js +37 -0
  70. package/dist/module/components/FontScaleButton.js.map +1 -0
  71. package/dist/module/components/FontScalePopup.js +77 -0
  72. package/dist/module/components/FontScalePopup.js.map +1 -0
  73. package/dist/module/components/FormCard.js +28 -0
  74. package/dist/module/components/FormCard.js.map +1 -0
  75. package/dist/module/components/FormCardSection.js +240 -0
  76. package/dist/module/components/FormCardSection.js.map +1 -0
  77. package/dist/module/components/FormCardSectionOptionLauncher.js +77 -0
  78. package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -0
  79. package/dist/module/components/FormattedText.js +145 -0
  80. package/dist/module/components/FormattedText.js.map +1 -0
  81. package/dist/module/components/GenericInput.js +161 -0
  82. package/dist/module/components/GenericInput.js.map +1 -0
  83. package/dist/module/components/GenericInputSection.js +174 -0
  84. package/dist/module/components/GenericInputSection.js.map +1 -0
  85. package/dist/module/components/Header.js +491 -0
  86. package/dist/module/components/Header.js.map +1 -0
  87. package/dist/module/components/ImagePopup.js +257 -0
  88. package/dist/module/components/ImagePopup.js.map +1 -0
  89. package/dist/module/components/ImageUploadProgress.js +72 -0
  90. package/dist/module/components/ImageUploadProgress.js.map +1 -0
  91. package/dist/module/components/ImageUploader.js +850 -0
  92. package/dist/module/components/ImageUploader.js.map +1 -0
  93. package/dist/module/components/InlineButton.js +72 -0
  94. package/dist/module/components/InlineButton.js.map +1 -0
  95. package/dist/module/components/Input.js +164 -0
  96. package/dist/module/components/Input.js.map +1 -0
  97. package/dist/module/components/LoadingCircles.js +224 -0
  98. package/dist/module/components/LoadingCircles.js.map +1 -0
  99. package/dist/module/components/LoadingIndicator.js +95 -0
  100. package/dist/module/components/LoadingIndicator.js.map +1 -0
  101. package/dist/module/components/LoadingStateWidget.js +51 -0
  102. package/dist/module/components/LoadingStateWidget.js.map +1 -0
  103. package/dist/module/components/MediaPlayer.js +453 -0
  104. package/dist/module/components/MediaPlayer.js.map +1 -0
  105. package/dist/module/components/MiddlePopup.js +46 -0
  106. package/dist/module/components/MiddlePopup.js.map +1 -0
  107. package/dist/module/components/PDFPopup.js +188 -0
  108. package/dist/module/components/PDFPopup.js.map +1 -0
  109. package/dist/module/components/PlussChat.js +997 -0
  110. package/dist/module/components/PlussChat.js.map +1 -0
  111. package/dist/module/components/PlussChatMessage.js +204 -0
  112. package/dist/module/components/PlussChatMessage.js.map +1 -0
  113. package/dist/module/components/PlussChatTime.js +66 -0
  114. package/dist/module/components/PlussChatTime.js.map +1 -0
  115. package/dist/module/components/Popup.js +138 -0
  116. package/dist/module/components/Popup.js.map +1 -0
  117. package/dist/module/components/PopupMenu.js +128 -0
  118. package/dist/module/components/PopupMenu.js.map +1 -0
  119. package/dist/module/components/PositionedImage.js +333 -0
  120. package/dist/module/components/PositionedImage.js.map +1 -0
  121. package/dist/module/components/ProfilePic.js +119 -0
  122. package/dist/module/components/ProfilePic.js.map +1 -0
  123. package/dist/module/components/RadioButton.js +84 -0
  124. package/dist/module/components/RadioButton.js.map +1 -0
  125. package/dist/module/components/Reaction.js +129 -0
  126. package/dist/module/components/Reaction.js.map +1 -0
  127. package/dist/module/components/Reactions.js +84 -0
  128. package/dist/module/components/Reactions.js.map +1 -0
  129. package/dist/module/components/SharingTools.js +162 -0
  130. package/dist/module/components/SharingTools.js.map +1 -0
  131. package/dist/module/components/Spinner.js +25 -0
  132. package/dist/module/components/Spinner.js.map +1 -0
  133. package/dist/module/components/StickyFooter.js +37 -0
  134. package/dist/module/components/StickyFooter.js.map +1 -0
  135. package/dist/module/components/TextStyle.js +34 -0
  136. package/dist/module/components/TextStyle.js.map +1 -0
  137. package/dist/module/components/Toggle.js +70 -0
  138. package/dist/module/components/Toggle.js.map +1 -0
  139. package/dist/module/components/TouchableSearchBar.js +73 -0
  140. package/dist/module/components/TouchableSearchBar.js.map +1 -0
  141. package/dist/module/components/UserListPopup.js +146 -0
  142. package/dist/module/components/UserListPopup.js.map +1 -0
  143. package/dist/module/components/UserListing.js +291 -0
  144. package/dist/module/components/UserListing.js.map +1 -0
  145. package/dist/module/components/VideoPopup.js +123 -0
  146. package/dist/module/components/VideoPopup.js.map +1 -0
  147. package/dist/module/components/WarningPopup.js +87 -0
  148. package/dist/module/components/WarningPopup.js.map +1 -0
  149. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +325 -0
  150. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -0
  151. package/dist/module/components/expo-image-picker-multiple/ImageTile.js +123 -0
  152. package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -0
  153. package/dist/module/components/index.js +53 -0
  154. package/dist/module/components/index.js.map +1 -0
  155. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +416 -0
  156. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -0
  157. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +405 -0
  158. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -0
  159. package/dist/module/config.js +27 -0
  160. package/dist/module/config.js.map +1 -0
  161. package/dist/module/constants.js +16 -0
  162. package/dist/module/constants.js.map +1 -0
  163. package/dist/module/fonts/index.js +2 -0
  164. package/dist/module/fonts/index.js.map +1 -0
  165. package/dist/module/fonts/pluss60-icons.js +5 -0
  166. package/dist/module/fonts/pluss60-icons.js.map +1 -0
  167. package/dist/module/fonts/pluss60-icons.json +1097 -0
  168. package/dist/module/helper.js +436 -0
  169. package/dist/module/helper.js.map +1 -0
  170. package/dist/module/index.js +13 -0
  171. package/dist/module/index.js.map +1 -0
  172. package/dist/module/session.js +54 -0
  173. package/dist/module/session.js.map +1 -0
  174. package/dist/module/styles.js +67 -0
  175. package/dist/module/styles.js.map +1 -0
  176. package/package.json +24 -7
  177. package/src/assets/icons/reactions/heart.png +0 -0
  178. package/src/assets/icons/reactions/party.png +0 -0
  179. package/src/assets/icons/reactions/sad.png +0 -0
  180. package/src/assets/icons/reactions/smile.png +0 -0
  181. package/src/components/CommentReply.js +3 -5
  182. package/src/components/CommentSection.js +4 -4
  183. package/src/components/MediaPlayer.js +14 -4
  184. package/src/components/VideoPopup.js +1 -1
  185. package/src/constants.js +4 -4
  186. package/src/helper.js +4 -4
@@ -0,0 +1,96 @@
1
+ import mime from 'mime-types';
2
+ import { Storage } from 'aws-amplify';
3
+ import { getUrl, generateImageName, randomString } from '../helper';
4
+ import { authedFunction } from '../session';
5
+ import Config from '../config';
6
+ export const fileActions = {
7
+ getUploadUrl: (userId, fileName) => {
8
+ const newFilename = fileName.replace(/[^a-z0-9+.]+/gi, '').toLowerCase();
9
+ return `uploads/users/${userId}/public/${randomString()}/${newFilename}`;
10
+ },
11
+ uploadUserMediaWithProgress: async function (imageUri, url) {
12
+ let progressCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
13
+ const blob = await fileActions.imageToBlob(imageUri);
14
+ return fileActions.uploadBlobAWS(Config.env.awsUploadsBucket, url, blob, '', progressCallback);
15
+ },
16
+ // uploadUserMedia: async (userId, image, fileName) => {
17
+ // const blob = await fileActions.imageToBlob(image.uri);
18
+ // const url = fileActions.getUploadUrl(userId, fileName);
19
+ // return fileActions.uploadBlobAWS(Config.env.awsUploadsBucket, url, blob);
20
+ // },
21
+ // uploadSignatureImage: async (image, name) => {
22
+ // const blob = await fileActions.imageToBlob(image);
23
+ // const newImageName = generateImageName(name, 'signature.png');
24
+ // return fileActions.uploadBlobAWS(Config.env.awsStorageBucket, newImageName, blob, 'images/');
25
+ // },
26
+ imageToBlob: async imageUri => {
27
+ const response = await fetch(imageUri);
28
+ return response.blob();
29
+ },
30
+ uploadBlobAWS: function (bucket, uri, blob) {
31
+ let prefix = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
32
+ let progressCallback = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
33
+ const imageName = prefix ? uri.replace(/^.*[\\/]/, '') : uri;
34
+ const fileType = mime.lookup(uri);
35
+ const access = {
36
+ level: 'public',
37
+ bucket,
38
+ contentType: fileType,
39
+ customPrefix: {
40
+ public: ''
41
+ },
42
+ progressCallback: progress => progressCallback && progressCallback({
43
+ uri,
44
+ loaded: progress.loaded,
45
+ total: progress.total,
46
+ percentage: `${Math.floor(progress.loaded / progress.total * 100)}%`
47
+ })
48
+ };
49
+ return Storage.put(`${prefix}${imageName}`, blob, access);
50
+ },
51
+ getStockPhotos: async () => {
52
+ const response = await authedFunction({
53
+ method: 'GET',
54
+ url: 'https://pluss60.pluss60-api.com/media-demo/library'
55
+ }); // Convert to images object
56
+
57
+ const images = response.data.map(image => {
58
+ return {
59
+ uri: image
60
+ };
61
+ });
62
+ return images;
63
+ },
64
+ getMediaFolders: site => {
65
+ const query = {
66
+ site
67
+ };
68
+ return authedFunction({
69
+ method: 'GET',
70
+ url: getUrl('media', 'folders', query)
71
+ });
72
+ } // addMediaFolder: (site, name, images) => {
73
+ // return authedFunction({
74
+ // method: 'POST',
75
+ // url: getUrl('media', 'addFolder'),
76
+ // data: {
77
+ // site,
78
+ // name,
79
+ // images,
80
+ // },
81
+ // });
82
+ // },
83
+ // addImagesToFolder: (id, site, images) => {
84
+ // return authedFunction({
85
+ // method: 'POST',
86
+ // url: getUrl('media', 'addImages'),
87
+ // data: {
88
+ // id,
89
+ // site,
90
+ // images,
91
+ // },
92
+ // });
93
+ // },
94
+
95
+ };
96
+ //# sourceMappingURL=fileActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["fileActions.js"],"names":["mime","Storage","getUrl","generateImageName","randomString","authedFunction","Config","fileActions","getUploadUrl","userId","fileName","newFilename","replace","toLowerCase","uploadUserMediaWithProgress","imageUri","url","progressCallback","blob","imageToBlob","uploadBlobAWS","env","awsUploadsBucket","response","fetch","bucket","uri","prefix","imageName","fileType","lookup","access","level","contentType","customPrefix","public","progress","loaded","total","percentage","Math","floor","put","getStockPhotos","method","images","data","map","image","getMediaFolders","site","query"],"mappings":"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","sourcesContent":["import mime from 'mime-types';\nimport { Storage } from 'aws-amplify';\nimport { getUrl, generateImageName, randomString } from '../helper';\nimport { authedFunction } from '../session';\nimport Config from '../config';\n\nexport const fileActions = {\n getUploadUrl: (userId, fileName) => {\n const newFilename = fileName.replace(/[^a-z0-9+.]+/gi, '').toLowerCase();\n return `uploads/users/${userId}/public/${randomString()}/${newFilename}`;\n },\n uploadUserMediaWithProgress: async (imageUri, url, progressCallback = null) => {\n const blob = await fileActions.imageToBlob(imageUri);\n return fileActions.uploadBlobAWS(Config.env.awsUploadsBucket, url, blob, '', progressCallback);\n },\n // uploadUserMedia: async (userId, image, fileName) => {\n // const blob = await fileActions.imageToBlob(image.uri);\n // const url = fileActions.getUploadUrl(userId, fileName);\n // return fileActions.uploadBlobAWS(Config.env.awsUploadsBucket, url, blob);\n // },\n // uploadSignatureImage: async (image, name) => {\n // const blob = await fileActions.imageToBlob(image);\n // const newImageName = generateImageName(name, 'signature.png');\n // return fileActions.uploadBlobAWS(Config.env.awsStorageBucket, newImageName, blob, 'images/');\n // },\n imageToBlob: async imageUri => {\n const response = await fetch(imageUri);\n return response.blob();\n },\n uploadBlobAWS: (bucket, uri, blob, prefix = '', progressCallback = null) => {\n const imageName = prefix ? uri.replace(/^.*[\\\\/]/, '') : uri;\n const fileType = mime.lookup(uri);\n const access = {\n level: 'public',\n bucket,\n contentType: fileType,\n customPrefix: { public: '' },\n progressCallback: progress =>\n progressCallback &&\n progressCallback({\n uri,\n loaded: progress.loaded,\n total: progress.total,\n percentage: `${Math.floor((progress.loaded / progress.total) * 100)}%`,\n }),\n };\n return Storage.put(`${prefix}${imageName}`, blob, access);\n },\n getStockPhotos: async () => {\n const response = await authedFunction({\n method: 'GET',\n url: 'https://pluss60.pluss60-api.com/media-demo/library',\n });\n // Convert to images object\n const images = response.data.map(image => {\n return { uri: image };\n });\n return images;\n },\n getMediaFolders: site => {\n const query = { site };\n return authedFunction({\n method: 'GET',\n url: getUrl('media', 'folders', query),\n });\n },\n // addMediaFolder: (site, name, images) => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('media', 'addFolder'),\n // data: {\n // site,\n // name,\n // images,\n // },\n // });\n // },\n // addImagesToFolder: (id, site, images) => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('media', 'addImages'),\n // data: {\n // id,\n // site,\n // images,\n // },\n // });\n // },\n};\n"]}
@@ -0,0 +1,38 @@
1
+ import { getUrl, getAuthTokenHeader } from '../helper';
2
+ import { authedFunction } from '../session';
3
+ export const followerActions = {
4
+ addFollower: async (contact, userID) => {
5
+ const request = {
6
+ method: 'POST',
7
+ url: getUrl('followers', 'addFollower'),
8
+ data: {
9
+ contact,
10
+ userID
11
+ },
12
+ headers: {}
13
+ };
14
+ request.headers.authorization = await getAuthTokenHeader();
15
+ return authedFunction(request);
16
+ },
17
+ removeFollower: async (contactID, userID) => {
18
+ const request = {
19
+ method: 'POST',
20
+ url: getUrl('followers', 'removeFollower'),
21
+ data: {
22
+ contactID,
23
+ userID
24
+ },
25
+ headers: {}
26
+ };
27
+ request.headers.authorization = await getAuthTokenHeader();
28
+ return authedFunction(request);
29
+ },
30
+ getFollowing: async () => {
31
+ const request = {
32
+ method: 'GET',
33
+ url: getUrl('followers', 'getFollowing')
34
+ };
35
+ return authedFunction(request);
36
+ }
37
+ };
38
+ //# sourceMappingURL=followerActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["followerActions.js"],"names":["getUrl","getAuthTokenHeader","authedFunction","followerActions","addFollower","contact","userID","request","method","url","data","headers","authorization","removeFollower","contactID","getFollowing"],"mappings":"AAAA,SAASA,MAAT,EAAiBC,kBAAjB,QAA2C,WAA3C;AACA,SAASC,cAAT,QAA+B,YAA/B;AAEA,OAAO,MAAMC,eAAe,GAAG;AAC7BC,EAAAA,WAAW,EAAE,OAAOC,OAAP,EAAgBC,MAAhB,KAA2B;AACtC,UAAMC,OAAO,GAAG;AACdC,MAAAA,MAAM,EAAE,MADM;AAEdC,MAAAA,GAAG,EAAET,MAAM,CAAC,WAAD,EAAc,aAAd,CAFG;AAGdU,MAAAA,IAAI,EAAE;AAAEL,QAAAA,OAAF;AAAWC,QAAAA;AAAX,OAHQ;AAIdK,MAAAA,OAAO,EAAE;AAJK,KAAhB;AAMAJ,IAAAA,OAAO,CAACI,OAAR,CAAgBC,aAAhB,GAAgC,MAAMX,kBAAkB,EAAxD;AACA,WAAOC,cAAc,CAACK,OAAD,CAArB;AACD,GAV4B;AAW7BM,EAAAA,cAAc,EAAE,OAAOC,SAAP,EAAkBR,MAAlB,KAA6B;AAC3C,UAAMC,OAAO,GAAG;AACdC,MAAAA,MAAM,EAAE,MADM;AAEdC,MAAAA,GAAG,EAAET,MAAM,CAAC,WAAD,EAAc,gBAAd,CAFG;AAGdU,MAAAA,IAAI,EAAE;AAAEI,QAAAA,SAAF;AAAaR,QAAAA;AAAb,OAHQ;AAIdK,MAAAA,OAAO,EAAE;AAJK,KAAhB;AAMAJ,IAAAA,OAAO,CAACI,OAAR,CAAgBC,aAAhB,GAAgC,MAAMX,kBAAkB,EAAxD;AACA,WAAOC,cAAc,CAACK,OAAD,CAArB;AACD,GApB4B;AAqB7BQ,EAAAA,YAAY,EAAE,YAAY;AACxB,UAAMR,OAAO,GAAG;AACdC,MAAAA,MAAM,EAAE,KADM;AAEdC,MAAAA,GAAG,EAAET,MAAM,CAAC,WAAD,EAAc,cAAd;AAFG,KAAhB;AAIA,WAAOE,cAAc,CAACK,OAAD,CAArB;AACD;AA3B4B,CAAxB","sourcesContent":["import { getUrl, getAuthTokenHeader } from '../helper';\nimport { authedFunction } from '../session';\n\nexport const followerActions = {\n addFollower: async (contact, userID) => {\n const request = {\n method: 'POST',\n url: getUrl('followers', 'addFollower'),\n data: { contact, userID },\n headers: {},\n };\n request.headers.authorization = await getAuthTokenHeader();\n return authedFunction(request);\n },\n removeFollower: async (contactID, userID) => {\n const request = {\n method: 'POST',\n url: getUrl('followers', 'removeFollower'),\n data: { contactID, userID },\n headers: {},\n };\n request.headers.authorization = await getAuthTokenHeader();\n return authedFunction(request);\n },\n getFollowing: async () => {\n const request = {\n method: 'GET',\n url: getUrl('followers', 'getFollowing'),\n };\n return authedFunction(request);\n },\n};\n"]}
@@ -0,0 +1,11 @@
1
+ export * from './reactionActions';
2
+ export * from './fileActions';
3
+ export * from './followerActions';
4
+ export * from './contactActions';
5
+ export * from './eventActions';
6
+ export * from './analyticsActions';
7
+ export * from './notificationActions';
8
+ export * from './typeActions';
9
+ export { default as userActions } from './userActions';
10
+ export { default as profileActions } from './profileActions';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.js"],"names":["default","userActions","profileActions"],"mappings":"AAAA,cAAc,mBAAd;AACA,cAAc,eAAd;AACA,cAAc,mBAAd;AACA,cAAc,kBAAd;AACA,cAAc,gBAAd;AACA,cAAc,oBAAd;AACA,cAAc,uBAAd;AACA,cAAc,eAAd;AACA,SAASA,OAAO,IAAIC,WAApB,QAAuC,eAAvC;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,kBAA1C","sourcesContent":["export * from './reactionActions';\nexport * from './fileActions';\nexport * from './followerActions';\nexport * from './contactActions';\nexport * from './eventActions';\nexport * from './analyticsActions';\nexport * from './notificationActions';\nexport * from './typeActions';\nexport { default as userActions } from './userActions';\nexport { default as profileActions } from './profileActions';\n"]}
@@ -0,0 +1,60 @@
1
+ import { getUrl } from '../helper';
2
+ import { authedFunction } from '../session';
3
+ export const notificationActions = {
4
+ getAppNotificationSetting: () => {
5
+ return authedFunction({
6
+ method: 'GET',
7
+ url: getUrl('notifications', 'getState/get', {
8
+ type: 'app'
9
+ })
10
+ });
11
+ },
12
+ muteApp: () => {
13
+ return authedFunction({
14
+ method: 'POST',
15
+ url: getUrl('notifications', 'updateState/mute'),
16
+ data: {
17
+ type: 'app'
18
+ }
19
+ });
20
+ },
21
+ unmuteApp: () => {
22
+ return authedFunction({
23
+ method: 'POST',
24
+ url: getUrl('notifications', 'updateState/unmute'),
25
+ data: {
26
+ type: 'app'
27
+ }
28
+ });
29
+ },
30
+ getEntityNotificationSetting: (type, id) => {
31
+ return authedFunction({
32
+ method: 'GET',
33
+ url: getUrl('notifications', 'getState/get', {
34
+ type,
35
+ id
36
+ })
37
+ });
38
+ },
39
+ muteEntity: (type, id) => {
40
+ return authedFunction({
41
+ method: 'POST',
42
+ url: getUrl('notifications', 'updateState/mute'),
43
+ data: {
44
+ type,
45
+ id
46
+ }
47
+ });
48
+ },
49
+ unmuteEntity: (type, id) => {
50
+ return authedFunction({
51
+ method: 'POST',
52
+ url: getUrl('notifications', 'updateState/unmute'),
53
+ data: {
54
+ type,
55
+ id
56
+ }
57
+ });
58
+ }
59
+ };
60
+ //# sourceMappingURL=notificationActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["notificationActions.js"],"names":["getUrl","authedFunction","notificationActions","getAppNotificationSetting","method","url","type","muteApp","data","unmuteApp","getEntityNotificationSetting","id","muteEntity","unmuteEntity"],"mappings":"AAAA,SAASA,MAAT,QAAuB,WAAvB;AACA,SAASC,cAAT,QAA+B,YAA/B;AAEA,OAAO,MAAMC,mBAAmB,GAAG;AACjCC,EAAAA,yBAAyB,EAAE,MAAM;AAC/B,WAAOF,cAAc,CAAC;AACpBG,MAAAA,MAAM,EAAE,KADY;AAEpBC,MAAAA,GAAG,EAAEL,MAAM,CAAC,eAAD,EAAkB,cAAlB,EAAkC;AAC3CM,QAAAA,IAAI,EAAE;AADqC,OAAlC;AAFS,KAAD,CAArB;AAMD,GARgC;AASjCC,EAAAA,OAAO,EAAE,MAAM;AACb,WAAON,cAAc,CAAC;AACpBG,MAAAA,MAAM,EAAE,MADY;AAEpBC,MAAAA,GAAG,EAAEL,MAAM,CAAC,eAAD,EAAkB,kBAAlB,CAFS;AAGpBQ,MAAAA,IAAI,EAAE;AAAEF,QAAAA,IAAI,EAAE;AAAR;AAHc,KAAD,CAArB;AAKD,GAfgC;AAgBjCG,EAAAA,SAAS,EAAE,MAAM;AACf,WAAOR,cAAc,CAAC;AACpBG,MAAAA,MAAM,EAAE,MADY;AAEpBC,MAAAA,GAAG,EAAEL,MAAM,CAAC,eAAD,EAAkB,oBAAlB,CAFS;AAGpBQ,MAAAA,IAAI,EAAE;AAAEF,QAAAA,IAAI,EAAE;AAAR;AAHc,KAAD,CAArB;AAKD,GAtBgC;AAuBjCI,EAAAA,4BAA4B,EAAE,CAACJ,IAAD,EAAOK,EAAP,KAAc;AAC1C,WAAOV,cAAc,CAAC;AACpBG,MAAAA,MAAM,EAAE,KADY;AAEpBC,MAAAA,GAAG,EAAEL,MAAM,CAAC,eAAD,EAAkB,cAAlB,EAAkC;AAAEM,QAAAA,IAAF;AAAQK,QAAAA;AAAR,OAAlC;AAFS,KAAD,CAArB;AAID,GA5BgC;AA6BjCC,EAAAA,UAAU,EAAE,CAACN,IAAD,EAAOK,EAAP,KAAc;AACxB,WAAOV,cAAc,CAAC;AACpBG,MAAAA,MAAM,EAAE,MADY;AAEpBC,MAAAA,GAAG,EAAEL,MAAM,CAAC,eAAD,EAAkB,kBAAlB,CAFS;AAGpBQ,MAAAA,IAAI,EAAE;AAAEF,QAAAA,IAAF;AAAQK,QAAAA;AAAR;AAHc,KAAD,CAArB;AAKD,GAnCgC;AAoCjCE,EAAAA,YAAY,EAAE,CAACP,IAAD,EAAOK,EAAP,KAAc;AAC1B,WAAOV,cAAc,CAAC;AACpBG,MAAAA,MAAM,EAAE,MADY;AAEpBC,MAAAA,GAAG,EAAEL,MAAM,CAAC,eAAD,EAAkB,oBAAlB,CAFS;AAGpBQ,MAAAA,IAAI,EAAE;AAAEF,QAAAA,IAAF;AAAQK,QAAAA;AAAR;AAHc,KAAD,CAArB;AAKD;AA1CgC,CAA5B","sourcesContent":["import { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nexport const notificationActions = {\n getAppNotificationSetting: () => {\n return authedFunction({\n method: 'GET',\n url: getUrl('notifications', 'getState/get', {\n type: 'app',\n }),\n });\n },\n muteApp: () => {\n return authedFunction({\n method: 'POST',\n url: getUrl('notifications', 'updateState/mute'),\n data: { type: 'app' },\n });\n },\n unmuteApp: () => {\n return authedFunction({\n method: 'POST',\n url: getUrl('notifications', 'updateState/unmute'),\n data: { type: 'app' },\n });\n },\n getEntityNotificationSetting: (type, id) => {\n return authedFunction({\n method: 'GET',\n url: getUrl('notifications', 'getState/get', { type, id }),\n });\n },\n muteEntity: (type, id) => {\n return authedFunction({\n method: 'POST',\n url: getUrl('notifications', 'updateState/mute'),\n data: { type, id },\n });\n },\n unmuteEntity: (type, id) => {\n return authedFunction({\n method: 'POST',\n url: getUrl('notifications', 'updateState/unmute'),\n data: { type, id },\n });\n },\n};\n"]}
@@ -0,0 +1,14 @@
1
+ import { getUrl } from '../helper';
2
+ import { authedFunction } from '../session';
3
+ const profileActions = {
4
+ getUserTagsBySite: site => {
5
+ return authedFunction({
6
+ method: 'GET',
7
+ url: getUrl('profile', 'usertags/site', {
8
+ site
9
+ })
10
+ });
11
+ }
12
+ };
13
+ export default profileActions;
14
+ //# sourceMappingURL=profileActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["profileActions.js"],"names":["getUrl","authedFunction","profileActions","getUserTagsBySite","site","method","url"],"mappings":"AAAA,SAASA,MAAT,QAAuB,WAAvB;AACA,SAASC,cAAT,QAA+B,YAA/B;AAEA,MAAMC,cAAc,GAAG;AACrBC,EAAAA,iBAAiB,EAAEC,IAAI,IAAI;AACzB,WAAOH,cAAc,CAAC;AACpBI,MAAAA,MAAM,EAAE,KADY;AAEpBC,MAAAA,GAAG,EAAEN,MAAM,CAAC,SAAD,EAAY,eAAZ,EAA6B;AAAEI,QAAAA;AAAF,OAA7B;AAFS,KAAD,CAArB;AAID;AANoB,CAAvB;AASA,eAAeF,cAAf","sourcesContent":["import { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nconst profileActions = {\n getUserTagsBySite: site => {\n return authedFunction({\n method: 'GET',\n url: getUrl('profile', 'usertags/site', { site }),\n });\n },\n};\n\nexport default profileActions;\n"]}
@@ -0,0 +1,78 @@
1
+ import _ from 'lodash';
2
+ import { getUrl } from '../helper';
3
+ import { authedFunction } from '../session';
4
+ export const reactionActions = {
5
+ add: (entityId, entityType, reaction, site) => {
6
+ return authedFunction({
7
+ method: 'POST',
8
+ url: getUrl('reactions', 'add'),
9
+ data: {
10
+ entityId,
11
+ entityType,
12
+ reaction,
13
+ site
14
+ }
15
+ });
16
+ },
17
+ remove: (entityId, entityType, reaction) => {
18
+ return authedFunction({
19
+ method: 'POST',
20
+ url: getUrl('reactions', 'remove'),
21
+ data: {
22
+ entityId,
23
+ entityType,
24
+ reaction
25
+ }
26
+ });
27
+ },
28
+ addComment: (entityId, entityType, entityName, site, comment, image, parentId) => {
29
+ const data = {
30
+ entityId,
31
+ entityType,
32
+ entityName,
33
+ site,
34
+ comment,
35
+ parentId
36
+ };
37
+ if (!_.isEmpty(image)) data.image = image;
38
+ return authedFunction({
39
+ method: 'POST',
40
+ url: getUrl('reactions', 'comments/add'),
41
+ data
42
+ });
43
+ },
44
+ removeComment: id => {
45
+ return authedFunction({
46
+ method: 'POST',
47
+ url: getUrl('reactions', 'comments/remove'),
48
+ data: {
49
+ id
50
+ }
51
+ });
52
+ },
53
+ reportComment: id => {
54
+ return authedFunction({
55
+ method: 'POST',
56
+ url: getUrl('reactions', 'comments/report'),
57
+ data: {
58
+ id
59
+ }
60
+ });
61
+ },
62
+ getComments: (entityId, entityType, minTime) => {
63
+ const query = {
64
+ entityId,
65
+ entityType
66
+ };
67
+
68
+ if (minTime) {
69
+ query.minTime = minTime;
70
+ }
71
+
72
+ return authedFunction({
73
+ method: 'GET',
74
+ url: getUrl('reactions', 'comments/get', query)
75
+ });
76
+ }
77
+ };
78
+ //# sourceMappingURL=reactionActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["reactionActions.js"],"names":["_","getUrl","authedFunction","reactionActions","add","entityId","entityType","reaction","site","method","url","data","remove","addComment","entityName","comment","image","parentId","isEmpty","removeComment","id","reportComment","getComments","minTime","query"],"mappings":"AAAA,OAAOA,CAAP,MAAc,QAAd;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,SAASC,cAAT,QAA+B,YAA/B;AAEA,OAAO,MAAMC,eAAe,GAAG;AAC7BC,EAAAA,GAAG,EAAE,CAACC,QAAD,EAAWC,UAAX,EAAuBC,QAAvB,EAAiCC,IAAjC,KAA0C;AAC7C,WAAON,cAAc,CAAC;AACpBO,MAAAA,MAAM,EAAE,MADY;AAEpBC,MAAAA,GAAG,EAAET,MAAM,CAAC,WAAD,EAAc,KAAd,CAFS;AAGpBU,MAAAA,IAAI,EAAE;AACJN,QAAAA,QADI;AAEJC,QAAAA,UAFI;AAGJC,QAAAA,QAHI;AAIJC,QAAAA;AAJI;AAHc,KAAD,CAArB;AAUD,GAZ4B;AAa7BI,EAAAA,MAAM,EAAE,CAACP,QAAD,EAAWC,UAAX,EAAuBC,QAAvB,KAAoC;AAC1C,WAAOL,cAAc,CAAC;AACpBO,MAAAA,MAAM,EAAE,MADY;AAEpBC,MAAAA,GAAG,EAAET,MAAM,CAAC,WAAD,EAAc,QAAd,CAFS;AAGpBU,MAAAA,IAAI,EAAE;AACJN,QAAAA,QADI;AAEJC,QAAAA,UAFI;AAGJC,QAAAA;AAHI;AAHc,KAAD,CAArB;AASD,GAvB4B;AAwB7BM,EAAAA,UAAU,EAAE,CAACR,QAAD,EAAWC,UAAX,EAAuBQ,UAAvB,EAAmCN,IAAnC,EAAyCO,OAAzC,EAAkDC,KAAlD,EAAyDC,QAAzD,KAAsE;AAChF,UAAMN,IAAI,GAAG;AACXN,MAAAA,QADW;AAEXC,MAAAA,UAFW;AAGXQ,MAAAA,UAHW;AAIXN,MAAAA,IAJW;AAKXO,MAAAA,OALW;AAMXE,MAAAA;AANW,KAAb;AAQA,QAAI,CAACjB,CAAC,CAACkB,OAAF,CAAUF,KAAV,CAAL,EAAuBL,IAAI,CAACK,KAAL,GAAaA,KAAb;AACvB,WAAOd,cAAc,CAAC;AACpBO,MAAAA,MAAM,EAAE,MADY;AAEpBC,MAAAA,GAAG,EAAET,MAAM,CAAC,WAAD,EAAc,cAAd,CAFS;AAGpBU,MAAAA;AAHoB,KAAD,CAArB;AAKD,GAvC4B;AAwC7BQ,EAAAA,aAAa,EAAEC,EAAE,IAAI;AACnB,WAAOlB,cAAc,CAAC;AACpBO,MAAAA,MAAM,EAAE,MADY;AAEpBC,MAAAA,GAAG,EAAET,MAAM,CAAC,WAAD,EAAc,iBAAd,CAFS;AAGpBU,MAAAA,IAAI,EAAE;AACJS,QAAAA;AADI;AAHc,KAAD,CAArB;AAOD,GAhD4B;AAiD7BC,EAAAA,aAAa,EAAED,EAAE,IAAI;AACnB,WAAOlB,cAAc,CAAC;AACpBO,MAAAA,MAAM,EAAE,MADY;AAEpBC,MAAAA,GAAG,EAAET,MAAM,CAAC,WAAD,EAAc,iBAAd,CAFS;AAGpBU,MAAAA,IAAI,EAAE;AACJS,QAAAA;AADI;AAHc,KAAD,CAArB;AAOD,GAzD4B;AA0D7BE,EAAAA,WAAW,EAAE,CAACjB,QAAD,EAAWC,UAAX,EAAuBiB,OAAvB,KAAmC;AAC9C,UAAMC,KAAK,GAAG;AACZnB,MAAAA,QADY;AAEZC,MAAAA;AAFY,KAAd;;AAIA,QAAIiB,OAAJ,EAAa;AACXC,MAAAA,KAAK,CAACD,OAAN,GAAgBA,OAAhB;AACD;;AACD,WAAOrB,cAAc,CAAC;AACpBO,MAAAA,MAAM,EAAE,KADY;AAEpBC,MAAAA,GAAG,EAAET,MAAM,CAAC,WAAD,EAAc,cAAd,EAA8BuB,KAA9B;AAFS,KAAD,CAArB;AAID;AAtE4B,CAAxB","sourcesContent":["import _ from 'lodash';\nimport { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nexport const reactionActions = {\n add: (entityId, entityType, reaction, site) => {\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'add'),\n data: {\n entityId,\n entityType,\n reaction,\n site,\n },\n });\n },\n remove: (entityId, entityType, reaction) => {\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'remove'),\n data: {\n entityId,\n entityType,\n reaction,\n },\n });\n },\n addComment: (entityId, entityType, entityName, site, comment, image, parentId) => {\n const data = {\n entityId,\n entityType,\n entityName,\n site,\n comment,\n parentId,\n };\n if (!_.isEmpty(image)) data.image = image;\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'comments/add'),\n data,\n });\n },\n removeComment: id => {\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'comments/remove'),\n data: {\n id,\n },\n });\n },\n reportComment: id => {\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'comments/report'),\n data: {\n id,\n },\n });\n },\n getComments: (entityId, entityType, minTime) => {\n const query = {\n entityId,\n entityType,\n };\n if (minTime) {\n query.minTime = minTime;\n }\n return authedFunction({\n method: 'GET',\n url: getUrl('reactions', 'comments/get', query),\n });\n },\n};\n"]}
@@ -0,0 +1,15 @@
1
+ import { getUrl } from '../helper';
2
+ import { authedFunction } from '../session';
3
+ export const typeActions = {
4
+ getUserTypes: site => {
5
+ const url = getUrl('types', 'getusertypes');
6
+ return authedFunction({
7
+ method: 'POST',
8
+ url,
9
+ data: {
10
+ site
11
+ }
12
+ });
13
+ }
14
+ };
15
+ //# sourceMappingURL=typeActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["typeActions.js"],"names":["getUrl","authedFunction","typeActions","getUserTypes","site","url","method","data"],"mappings":"AAAA,SAASA,MAAT,QAAuB,WAAvB;AACA,SAASC,cAAT,QAA+B,YAA/B;AAEA,OAAO,MAAMC,WAAW,GAAG;AACzBC,EAAAA,YAAY,EAAEC,IAAI,IAAI;AACpB,UAAMC,GAAG,GAAGL,MAAM,CAAC,OAAD,EAAU,cAAV,CAAlB;AACA,WAAOC,cAAc,CAAC;AACpBK,MAAAA,MAAM,EAAE,MADY;AAEpBD,MAAAA,GAFoB;AAGpBE,MAAAA,IAAI,EAAE;AAAEH,QAAAA;AAAF;AAHc,KAAD,CAArB;AAKD;AARwB,CAApB","sourcesContent":["import { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nexport const typeActions = {\n getUserTypes: site => {\n const url = getUrl('types', 'getusertypes');\n return authedFunction({\n method: 'POST',\n url,\n data: { site },\n });\n },\n};\n"]}
@@ -0,0 +1,104 @@
1
+ // import axios from 'axios';
2
+ // import Constants from 'expo-constants';
3
+ import { getUrl } from '../helper';
4
+ import { authedFunction } from '../session';
5
+ export default {
6
+ // registerUserToken: token => {
7
+ // return authedFunction({
8
+ // method: 'POST',
9
+ // url: getUrl('notifications', 'registerNotificationToken'),
10
+ // data: { token, deviceId: Constants.installationId },
11
+ // });
12
+ // },
13
+ // unregisterUserToken: () => {
14
+ // return authedFunction({
15
+ // method: 'POST',
16
+ // url: getUrl('notifications', 'unregisterNotificationToken'),
17
+ // data: { deviceId: Constants.installationId },
18
+ // });
19
+ // },
20
+ // updateProfile: input => {
21
+ // return authedFunction({
22
+ // method: 'POST',
23
+ // url: getUrl('users', 'updateProfile'),
24
+ // data: {
25
+ // details: input,
26
+ // },
27
+ // });
28
+ // },
29
+ getLinkedUsers: userID => {
30
+ return authedFunction({
31
+ method: 'GET',
32
+ url: getUrl('linkedusers', 'getLinkedTo', {
33
+ userID
34
+ })
35
+ });
36
+ },
37
+ getLinkedToMe: userID => {
38
+ return authedFunction({
39
+ method: 'GET',
40
+ url: getUrl('linkedusers', 'getLinkedToMe', {
41
+ userID
42
+ })
43
+ });
44
+ },
45
+ // getInviteCode: site => {
46
+ // return authedFunction({
47
+ // method: 'GET',
48
+ // url: getUrl('users', 'invite/get', { site }),
49
+ // });
50
+ // },
51
+ // generateInviteCode: site => {
52
+ // return authedFunction({
53
+ // method: 'POST',
54
+ // url: getUrl('users', 'invite/generate'),
55
+ // data: {
56
+ // site,
57
+ // },
58
+ // });
59
+ // },
60
+ // validateInviteCode: code => {
61
+ // return axios({
62
+ // method: 'POST',
63
+ // url: getUrl('users', 'invite/validate'),
64
+ // data: {
65
+ // code,
66
+ // },
67
+ // }).catch(error => {
68
+ // console.log('validateInviteCode error', error);
69
+ // throw error;
70
+ // });
71
+ // },
72
+ // signUpViaInviteCode: (user, code, info) => {
73
+ // return axios({
74
+ // method: 'POST',
75
+ // url: getUrl('users', 'invite/signup'),
76
+ // data: {
77
+ // user,
78
+ // code,
79
+ // info,
80
+ // },
81
+ // }).catch(error => {
82
+ // console.log('signUpViaInviteCode error', error);
83
+ // throw error;
84
+ // });
85
+ // },
86
+ getSiteUsers: site => {
87
+ return authedFunction({
88
+ method: 'GET',
89
+ url: getUrl('users', 'getsite', {
90
+ site
91
+ })
92
+ });
93
+ } // getUsers: site => {
94
+ // return authedFunction({
95
+ // method: 'POST',
96
+ // url: getUrl('users', 'get'),
97
+ // data: {
98
+ // site,
99
+ // },
100
+ // });
101
+ // },
102
+
103
+ };
104
+ //# sourceMappingURL=userActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["userActions.js"],"names":["getUrl","authedFunction","getLinkedUsers","userID","method","url","getLinkedToMe","getSiteUsers","site"],"mappings":"AAAA;AACA;AACA,SAASA,MAAT,QAAuB,WAAvB;AACA,SAASC,cAAT,QAA+B,YAA/B;AAEA,eAAe;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAC,EAAAA,cAAc,EAAEC,MAAM,IAAI;AACxB,WAAOF,cAAc,CAAC;AACpBG,MAAAA,MAAM,EAAE,KADY;AAEpBC,MAAAA,GAAG,EAAEL,MAAM,CAAC,aAAD,EAAgB,aAAhB,EAA+B;AAAEG,QAAAA;AAAF,OAA/B;AAFS,KAAD,CAArB;AAID,GA7BY;AA8BbG,EAAAA,aAAa,EAAEH,MAAM,IAAI;AACvB,WAAOF,cAAc,CAAC;AACpBG,MAAAA,MAAM,EAAE,KADY;AAEpBC,MAAAA,GAAG,EAAEL,MAAM,CAAC,aAAD,EAAgB,eAAhB,EAAiC;AAAEG,QAAAA;AAAF,OAAjC;AAFS,KAAD,CAArB;AAID,GAnCY;AAoCb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAI,EAAAA,YAAY,EAAEC,IAAI,IAAI;AACpB,WAAOP,cAAc,CAAC;AACpBG,MAAAA,MAAM,EAAE,KADY;AAEpBC,MAAAA,GAAG,EAAEL,MAAM,CAAC,OAAD,EAAU,SAAV,EAAqB;AAAEQ,QAAAA;AAAF,OAArB;AAFS,KAAD,CAArB;AAID,GAlFY,CAmFb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA3Fa,CAAf","sourcesContent":["// import axios from 'axios';\n// import Constants from 'expo-constants';\nimport { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nexport default {\n // registerUserToken: token => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('notifications', 'registerNotificationToken'),\n // data: { token, deviceId: Constants.installationId },\n // });\n // },\n // unregisterUserToken: () => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('notifications', 'unregisterNotificationToken'),\n // data: { deviceId: Constants.installationId },\n // });\n // },\n // updateProfile: input => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('users', 'updateProfile'),\n // data: {\n // details: input,\n // },\n // });\n // },\n getLinkedUsers: userID => {\n return authedFunction({\n method: 'GET',\n url: getUrl('linkedusers', 'getLinkedTo', { userID }),\n });\n },\n getLinkedToMe: userID => {\n return authedFunction({\n method: 'GET',\n url: getUrl('linkedusers', 'getLinkedToMe', { userID }),\n });\n },\n // getInviteCode: site => {\n // return authedFunction({\n // method: 'GET',\n // url: getUrl('users', 'invite/get', { site }),\n // });\n // },\n // generateInviteCode: site => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('users', 'invite/generate'),\n // data: {\n // site,\n // },\n // });\n // },\n // validateInviteCode: code => {\n // return axios({\n // method: 'POST',\n // url: getUrl('users', 'invite/validate'),\n // data: {\n // code,\n // },\n // }).catch(error => {\n // console.log('validateInviteCode error', error);\n // throw error;\n // });\n // },\n // signUpViaInviteCode: (user, code, info) => {\n // return axios({\n // method: 'POST',\n // url: getUrl('users', 'invite/signup'),\n // data: {\n // user,\n // code,\n // info,\n // },\n // }).catch(error => {\n // console.log('signUpViaInviteCode error', error);\n // throw error;\n // });\n // },\n getSiteUsers: site => {\n return authedFunction({\n method: 'GET',\n url: getUrl('users', 'getsite', { site }),\n });\n },\n // getUsers: site => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('users', 'get'),\n // data: {\n // site,\n // },\n // });\n // },\n};\n"]}
@@ -0,0 +1,149 @@
1
+ // const COLOUR_1 = '#011d5c';
2
+ // const COLOUR_2 = '#3179cb';
3
+ // const COLOUR_3 = '#1bb7ee';
4
+ const TEXT_DARKEST = '#3e4245';
5
+ const TEXT_DARK = TEXT_DARKEST;
6
+ const TEXT_BLUEGREY = '#6c7a90'; // const TEXT_DARK_ALPHA50 = 'rgba(60, 60, 80, .5)';
7
+ // const TEXT_DARK_ALPHA20 = 'rgba(60, 60, 80, .2)';
8
+ // const TEXT_DARK_ALPHA10 = 'rgba(60, 60, 80, .1)';
9
+
10
+ const TEXT_MID = '#5a5a6e'; // const TEXT_MID_ALPHA50 = 'rgba(90, 90, 110, .5)';
11
+
12
+ const TEXT_LIGHT = '#717b81';
13
+ const TEXT_LIGHTER = 'rgba(113, 123, 129, 0.8)';
14
+ const TEXT_SUPER_LIGHT = '#d1d1d1';
15
+ const BG_GREY = '#e9e9ef';
16
+ const LINEGREY = '#d5dde4';
17
+ const BOXGREY = '#ebeff2';
18
+ const PINKISH_GREY = '#c4c4c4'; // const PALE_GREY = '#f6f7f9';
19
+
20
+ const INACTIVE_BUTTON = '#d5d9e1';
21
+ const INACTIVE_TEXT = 'rgba(113, 123, 130, 0.8)';
22
+ const COLOUR_TEAL = '#82d6e5'; // const COLOUR_TEAL_ALPHA50 = 'rgba(4, 196, 169, 0.2)';
23
+ // const COLOUR_BLUE = '#0083ee';
24
+ // const COLOUR_BLUE_LIVE = 'rgb(0, 173, 238)';
25
+ // const COLOUR_BLUE_ALPHA10 = 'rgba(0, 131, 238, 0.1)';
26
+ // const COLOUR_DARKBLUE = '#191e78';
27
+ // const COLOUR_PURPLE = '#8e44ad';
28
+ // const COLOUR_RED = '#C52F40';
29
+
30
+ const COLOUR_GRAPEFRUIT = '#FF6363';
31
+ const COLOUR_GREEN = '#00cc76';
32
+ const COLOUR_GREEN_LIGHT = '#58dba4';
33
+ const COLOUR_TANGERINE = '#ff8c75'; // const COLOUR_CITRON = '#bdbd27';
34
+ // const DARK_OVERLAY = 'rgba(19,19,26,.6)';
35
+ // const FACEBOOK_BLUE = '#3B5998';
36
+ // const COLOUR_NAV_GREY = '#f6f6f6';
37
+
38
+ const COLOUR_TRANSPARENT = 'rgba(0,0,0,0)'; // const COLOUR_SIDEBAR = '#303030';
39
+
40
+ const COLOUR_BRANDING_MAIN = '#FF6363'; // const COLOUR_BRANDING_OFF = '#FCE1E1';
41
+
42
+ const COLOUR_BRANDING_LIGHT = '#FCE1E1'; // const COLOUR_BRANDING_SECONDARY = COLOUR_BRANDING_MAIN;
43
+
44
+ const COLOUR_BRANDING_DARK = '#D13636'; // const COLOUR_DAY = '#89c4f4';
45
+ // const COLOUR_NIGHT = '#003159';
46
+
47
+ const COLOUR_TAN = '#fff3d1'; // const hexToRGB = hex => {
48
+ // // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
49
+ // const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
50
+ // hex = hex.replace(shorthandRegex, (m, r, g, b) => {
51
+ // return r + r + g + g + b + b;
52
+ // });
53
+ // const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
54
+ // return result
55
+ // ? {
56
+ // r: parseInt(result[1], 16),
57
+ // g: parseInt(result[2], 16),
58
+ // b: parseInt(result[3], 16),
59
+ // }
60
+ // : null;
61
+ // };
62
+
63
+ const hexToRGBAstring = (hex, opacity) => {
64
+ // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
65
+ const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
66
+ hex = hex.replace(shorthandRegex, (m, r, g, b) => {
67
+ return r + r + g + g + b + b;
68
+ });
69
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
70
+ return result ? `rgba(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)}, ${opacity})` : null;
71
+ }; // const pctBtwnColours = (c1, c2, percentage) => {
72
+ // const rgbC1 = hexToRGB(c1);
73
+ // const rgbC2 = hexToRGB(c2);
74
+ // const r = rgbC2.r + (rgbC1.r - rgbC2.r) * percentage;
75
+ // const g = rgbC2.g + (rgbC1.g - rgbC2.g) * percentage;
76
+ // const b = rgbC2.b + (rgbC1.b - rgbC2.b) * percentage;
77
+ // return `rgb(${r}, ${g}, ${b})`;
78
+ // };
79
+ // const getTabIconColour = (mainColour, footerType, selected) => {
80
+ // if (footerType !== 'white') {
81
+ // return '#fff';
82
+ // }
83
+ // if (selected) {
84
+ // return mainColour;
85
+ // }
86
+ // return TEXT_BLUEGREY;
87
+ // };
88
+ // const getHeaderBrandingColourFromState = state => {
89
+ // return (state && state.user && state.user.siteBranding && state.user.siteBranding.HeaderBrandingColour) || null;
90
+ // };
91
+
92
+
93
+ const getMainBrandingColourFromState = state => {
94
+ return state && state.user && state.user.siteBranding && state.user.siteBranding.MainBrandingColour || COLOUR_BRANDING_MAIN;
95
+ };
96
+
97
+ const getDarkBrandingColourFromState = state => {
98
+ return state && state.user && state.user.siteBranding && state.user.siteBranding.DarkBrandingColour || COLOUR_BRANDING_DARK;
99
+ };
100
+
101
+ const getLightBrandingColourFromState = state => {
102
+ return state && state.user && state.user.siteBranding && state.user.siteBranding.LightBrandingColour || COLOUR_BRANDING_LIGHT;
103
+ }; // const getSecondaryBrandingColourFromState = state => {
104
+ // return (state && state.user && state.user.siteBranding && state.user.siteBranding.SecondaryBrandingColour) || COLOUR_BRANDING_SECONDARY;
105
+ // };
106
+ // const getMainBrandingColourFromSite = site => {
107
+ // return (site.Branding && site.Branding.MainBrandingColour) || COLOUR_BRANDING_MAIN;
108
+ // };
109
+ // const getDarkBrandingColourFromSite = site => {
110
+ // return (site.Branding && site.Branding.DarkBrandingColour) || COLOUR_BRANDING_DARK;
111
+ // };
112
+ // const getLightBrandingColourFromSite = site => {
113
+ // return (site.Branding && site.Branding.LightBrandingColour) || COLOUR_BRANDING_LIGHT;
114
+ // };
115
+
116
+
117
+ export { // COLOUR_1,
118
+ // COLOUR_2,
119
+ // COLOUR_3,
120
+ TEXT_DARKEST, TEXT_BLUEGREY, TEXT_DARK, // TEXT_DARK_ALPHA50,
121
+ // TEXT_DARK_ALPHA20,
122
+ // TEXT_DARK_ALPHA10,
123
+ TEXT_MID, // TEXT_MID_ALPHA50,
124
+ TEXT_LIGHT, TEXT_LIGHTER, TEXT_SUPER_LIGHT, BG_GREY, LINEGREY, PINKISH_GREY, BOXGREY, // PALE_GREY,
125
+ INACTIVE_BUTTON, INACTIVE_TEXT, COLOUR_TEAL, // COLOUR_TEAL_ALPHA50,
126
+ // COLOUR_BLUE,
127
+ // COLOUR_BLUE_LIVE,
128
+ // COLOUR_BLUE_ALPHA10,
129
+ // COLOUR_DARKBLUE,
130
+ // COLOUR_PURPLE,
131
+ // COLOUR_RED,
132
+ COLOUR_TANGERINE, // COLOUR_CITRON,
133
+ // DARK_OVERLAY,
134
+ // hexToRGB,
135
+ hexToRGBAstring, // pctBtwnColours,
136
+ // FACEBOOK_BLUE,
137
+ // COLOUR_NAV_GREY,
138
+ COLOUR_TRANSPARENT, // COLOUR_SIDEBAR,
139
+ COLOUR_BRANDING_MAIN, // COLOUR_BRANDING_OFF,
140
+ COLOUR_BRANDING_LIGHT, COLOUR_BRANDING_DARK, COLOUR_GREEN, COLOUR_GREEN_LIGHT, COLOUR_GRAPEFRUIT, // COLOUR_DAY,
141
+ // COLOUR_NIGHT,
142
+ COLOUR_TAN, // getHeaderBrandingColourFromState,
143
+ getMainBrandingColourFromState, getDarkBrandingColourFromState, getLightBrandingColourFromState // getSecondaryBrandingColourFromState,
144
+ // getMainBrandingColourFromSite,
145
+ // getDarkBrandingColourFromSite,
146
+ // getLightBrandingColourFromSite,
147
+ // getTabIconColour,
148
+ };
149
+ //# sourceMappingURL=colours.js.map