@plusscommunities/pluss-core-app 7.1.15 → 7.1.16
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/FollowerActions.js +4 -4
- package/dist/module/actions/FollowerActions.js.map +1 -1
- package/dist/module/actions/MediaActions.js +1 -1
- package/dist/module/actions/MediaActions.js.map +1 -1
- package/dist/module/actions/ResidentActions.js +1 -1
- package/dist/module/actions/ResidentActions.js.map +1 -1
- package/dist/module/actions/UserActions.js +1 -1
- package/dist/module/actions/UserActions.js.map +1 -1
- package/dist/module/actions/UserSettingsActions.js +1 -1
- package/dist/module/actions/UserSettingsActions.js.map +1 -1
- package/dist/module/actions/index.js +5 -5
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +16 -16
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/apis/analyticsActions.js +5 -5
- package/dist/module/apis/analyticsActions.js.map +1 -1
- package/dist/module/apis/contactActions.js +6 -6
- package/dist/module/apis/contactActions.js.map +1 -1
- package/dist/module/apis/eventActions.js +28 -28
- package/dist/module/apis/eventActions.js.map +1 -1
- package/dist/module/apis/fileActions.js +15 -15
- package/dist/module/apis/fileActions.js.map +1 -1
- package/dist/module/apis/followerActions.js +8 -8
- package/dist/module/apis/followerActions.js.map +1 -1
- package/dist/module/apis/index.js +12 -12
- package/dist/module/apis/index.js.map +1 -1
- package/dist/module/apis/notificationActions.js +17 -17
- package/dist/module/apis/notificationActions.js.map +1 -1
- package/dist/module/apis/profileActions.js +4 -4
- package/dist/module/apis/profileActions.js.map +1 -1
- package/dist/module/apis/reactionActions.js +15 -15
- package/dist/module/apis/reactionActions.js.map +1 -1
- package/dist/module/apis/settingActions.js +6 -6
- package/dist/module/apis/settingActions.js.map +1 -1
- package/dist/module/apis/stringActions.js +8 -8
- package/dist/module/apis/stringActions.js.map +1 -1
- package/dist/module/apis/typeActions.js +4 -4
- package/dist/module/apis/typeActions.js.map +1 -1
- package/dist/module/apis/userActions.js +8 -8
- package/dist/module/apis/userActions.js.map +1 -1
- package/dist/module/colours.js +23 -23
- package/dist/module/colours.js.map +1 -1
- package/dist/module/components/AddButton.js +6 -6
- package/dist/module/components/AddButton.js.map +1 -1
- package/dist/module/components/AddToCalendarButton.js +29 -29
- package/dist/module/components/AddToCalendarButton.js.map +1 -1
- package/dist/module/components/Attachment.js +9 -9
- package/dist/module/components/Attachment.js.map +1 -1
- package/dist/module/components/AudienceSelectorLauncher.js +11 -11
- package/dist/module/components/AudienceSelectorLauncher.js.map +1 -1
- package/dist/module/components/AudienceSelectorPage.js +44 -44
- package/dist/module/components/AudienceSelectorPage.js.map +1 -1
- package/dist/module/components/AutoOffsetImage.js +13 -13
- package/dist/module/components/AutoOffsetImage.js.map +1 -1
- package/dist/module/components/BackButton.js +8 -8
- package/dist/module/components/BackButton.js.map +1 -1
- package/dist/module/components/CalendarPopup.js +19 -19
- package/dist/module/components/CalendarPopup.js.map +1 -1
- package/dist/module/components/CategoryTabs.js +29 -29
- package/dist/module/components/CategoryTabs.js.map +1 -1
- package/dist/module/components/CommentReply.js +32 -32
- package/dist/module/components/CommentReply.js.map +1 -1
- package/dist/module/components/CommentSection.js +72 -72
- package/dist/module/components/CommentSection.js.map +1 -1
- package/dist/module/components/ConfirmPopup.js +20 -20
- package/dist/module/components/ConfirmPopup.js.map +1 -1
- package/dist/module/components/ConfirmationPopup.js +9 -9
- package/dist/module/components/ConfirmationPopup.js.map +1 -1
- package/dist/module/components/DocumentUploader.js +34 -34
- package/dist/module/components/DocumentUploader.js.map +1 -1
- package/dist/module/components/DropDownItem.js +13 -13
- package/dist/module/components/DropDownItem.js.map +1 -1
- package/dist/module/components/DropDownMenu.js +5 -5
- package/dist/module/components/DropDownMenu.js.map +1 -1
- package/dist/module/components/EmptyStateMain.js +9 -9
- package/dist/module/components/EmptyStateMain.js.map +1 -1
- package/dist/module/components/EmptyStateWidget.js +6 -6
- package/dist/module/components/EmptyStateWidget.js.map +1 -1
- package/dist/module/components/FontScaleButton.js +4 -4
- package/dist/module/components/FontScaleButton.js.map +1 -1
- package/dist/module/components/FontScalePopup.js +10 -10
- package/dist/module/components/FontScalePopup.js.map +1 -1
- package/dist/module/components/Forbidden.js +12 -12
- package/dist/module/components/Forbidden.js.map +1 -1
- package/dist/module/components/FormCard.js +4 -4
- package/dist/module/components/FormCard.js.map +1 -1
- package/dist/module/components/FormCardSection.js +17 -17
- package/dist/module/components/FormCardSection.js.map +1 -1
- package/dist/module/components/FormCardSectionOptionLauncher.js +12 -12
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -1
- package/dist/module/components/FormattedText.js +16 -16
- package/dist/module/components/FormattedText.js.map +1 -1
- package/dist/module/components/GenericInput.js +15 -15
- package/dist/module/components/GenericInput.js.map +1 -1
- package/dist/module/components/GenericInputSection.js +26 -26
- package/dist/module/components/GenericInputSection.js.map +1 -1
- package/dist/module/components/Header.js +67 -67
- package/dist/module/components/Header.js.map +1 -1
- package/dist/module/components/ImagePopup.js +39 -39
- package/dist/module/components/ImagePopup.js.map +1 -1
- package/dist/module/components/ImageUploadProgress.js +9 -9
- package/dist/module/components/ImageUploadProgress.js.map +1 -1
- package/dist/module/components/ImageUploader.js +103 -119
- package/dist/module/components/ImageUploader.js.map +1 -1
- package/dist/module/components/InlineButton.js +8 -8
- package/dist/module/components/InlineButton.js.map +1 -1
- package/dist/module/components/Input.js +26 -26
- package/dist/module/components/Input.js.map +1 -1
- package/dist/module/components/LoadingCircles.js +20 -20
- package/dist/module/components/LoadingCircles.js.map +1 -1
- package/dist/module/components/LoadingIndicator.js +11 -11
- package/dist/module/components/LoadingIndicator.js.map +1 -1
- package/dist/module/components/LoadingStateWidget.js +5 -5
- package/dist/module/components/LoadingStateWidget.js.map +1 -1
- package/dist/module/components/MediaPlayer.js +31 -31
- package/dist/module/components/MediaPlayer.js.map +1 -1
- package/dist/module/components/MiddlePopup.js +9 -9
- package/dist/module/components/MiddlePopup.js.map +1 -1
- package/dist/module/components/PDFPopup.js +33 -33
- package/dist/module/components/PDFPopup.js.map +1 -1
- package/dist/module/components/PlussChat.js +98 -98
- package/dist/module/components/PlussChat.js.map +1 -1
- package/dist/module/components/PlussChatMessage.js +40 -40
- package/dist/module/components/PlussChatMessage.js.map +1 -1
- package/dist/module/components/PlussChatTime.js +17 -17
- package/dist/module/components/PlussChatTime.js.map +1 -1
- package/dist/module/components/Popup.js +19 -19
- package/dist/module/components/Popup.js.map +1 -1
- package/dist/module/components/PopupMenu.js +14 -14
- package/dist/module/components/PopupMenu.js.map +1 -1
- package/dist/module/components/PositionedImage.js +20 -20
- package/dist/module/components/PositionedImage.js.map +1 -1
- package/dist/module/components/ProfilePic.js +10 -10
- package/dist/module/components/ProfilePic.js.map +1 -1
- package/dist/module/components/RadioButton.js +9 -9
- package/dist/module/components/RadioButton.js.map +1 -1
- package/dist/module/components/Reaction.js +17 -17
- package/dist/module/components/Reaction.js.map +1 -1
- package/dist/module/components/Reactions.js +7 -7
- package/dist/module/components/Reactions.js.map +1 -1
- package/dist/module/components/SharingTools.js +28 -28
- package/dist/module/components/SharingTools.js.map +1 -1
- package/dist/module/components/Spinner.js +5 -5
- package/dist/module/components/Spinner.js.map +1 -1
- package/dist/module/components/StickyFooter.js +6 -6
- package/dist/module/components/StickyFooter.js.map +1 -1
- package/dist/module/components/TextStyle.js +9 -9
- package/dist/module/components/TextStyle.js.map +1 -1
- package/dist/module/components/TickIcon.js +4 -4
- package/dist/module/components/TickIcon.js.map +1 -1
- package/dist/module/components/Toggle.js +9 -9
- package/dist/module/components/Toggle.js.map +1 -1
- package/dist/module/components/TouchableSearchBar.js +15 -15
- package/dist/module/components/TouchableSearchBar.js.map +1 -1
- package/dist/module/components/UserListPopup.js +19 -19
- package/dist/module/components/UserListPopup.js.map +1 -1
- package/dist/module/components/UserListing.js +40 -40
- package/dist/module/components/UserListing.js.map +1 -1
- package/dist/module/components/VideoPopup.js +18 -18
- package/dist/module/components/VideoPopup.js.map +1 -1
- package/dist/module/components/WarningPopup.js +18 -18
- package/dist/module/components/WarningPopup.js.map +1 -1
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +13 -13
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -1
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +23 -23
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -1
- package/dist/module/components/index.js +58 -58
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +40 -41
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -1
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +64 -64
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -1
- package/dist/module/config.js +9 -9
- package/dist/module/config.js.map +1 -1
- package/dist/module/constants.js +3 -3
- package/dist/module/constants.js.map +1 -1
- package/dist/module/fonts/index.js +2 -1
- package/dist/module/fonts/index.js.map +1 -1
- package/dist/module/fonts/pluss-icons.js +5 -0
- package/dist/module/fonts/pluss-icons.js.map +1 -0
- package/dist/module/fonts/pluss-icons.json +1737 -0
- package/dist/module/fonts/pluss60-icons.js +3 -3
- package/dist/module/fonts/pluss60-icons.js.map +1 -1
- package/dist/module/fonts/pluss60-icons.json +1588 -1095
- package/dist/module/helper.js +82 -82
- package/dist/module/helper.js.map +1 -1
- package/dist/module/index.js +11 -11
- package/dist/module/index.js.map +1 -1
- package/dist/module/js/images/detectFaces.js +6 -6
- package/dist/module/js/images/detectFaces.js.map +1 -1
- package/dist/module/js/images/findLandmarkRange.js +8 -8
- package/dist/module/js/images/findLandmarkRange.js.map +1 -1
- package/dist/module/js/images/getScaledOffset.js.map +1 -1
- package/dist/module/js/site/getSiteLevelFromState.js +2 -2
- package/dist/module/js/site/getSiteLevelFromState.js.map +1 -1
- package/dist/module/js/site/isTVEnabled.js +2 -2
- package/dist/module/js/site/isTVEnabled.js.map +1 -1
- package/dist/module/session.js +4 -4
- package/dist/module/session.js.map +1 -1
- package/dist/module/styles.js +17 -17
- package/dist/module/styles.js.map +1 -1
- package/package.json +68 -68
- package/src/actions/FollowerActions.js +36 -32
- package/src/actions/MediaActions.js +25 -20
- package/src/actions/ResidentActions.js +26 -21
- package/src/actions/UserActions.js +22 -22
- package/src/actions/UserSettingsActions.js +11 -11
- package/src/actions/index.js +5 -5
- package/src/actions/types.js +16 -16
- package/src/apis/analyticsActions.js +17 -17
- package/src/apis/contactActions.js +20 -20
- package/src/apis/eventActions.js +153 -144
- package/src/apis/fileActions.js +96 -86
- package/src/apis/followerActions.js +29 -29
- package/src/apis/index.js +12 -12
- package/src/apis/notificationActions.js +44 -44
- package/src/apis/profileActions.js +8 -8
- package/src/apis/reactionActions.js +81 -73
- package/src/apis/settingActions.js +15 -15
- package/src/apis/stringActions.js +29 -25
- package/src/apis/typeActions.js +10 -10
- package/src/apis/userActions.js +93 -93
- package/src/colours.js +114 -94
- package/src/components/AddButton.js +32 -27
- package/src/components/AddToCalendarButton.js +236 -202
- package/src/components/Attachment.js +58 -36
- package/src/components/AudienceSelectorLauncher.js +52 -48
- package/src/components/AudienceSelectorPage.js +358 -311
- package/src/components/AutoOffsetImage.js +237 -196
- package/src/components/BackButton.js +57 -41
- package/src/components/CalendarPopup.js +122 -97
- package/src/components/CategoryTabs.js +207 -163
- package/src/components/CommentReply.js +361 -309
- package/src/components/CommentSection.js +974 -781
- package/src/components/ConfirmPopup.js +140 -110
- package/src/components/ConfirmationPopup.js +80 -69
- package/src/components/DocumentUploader.js +243 -213
- package/src/components/DropDownItem.js +69 -60
- package/src/components/DropDownMenu.js +31 -27
- package/src/components/EmptyStateMain.js +50 -44
- package/src/components/EmptyStateWidget.js +46 -38
- package/src/components/FontScaleButton.js +28 -25
- package/src/components/FontScalePopup.js +66 -56
- package/src/components/Forbidden.js +48 -46
- package/src/components/FormCard.js +21 -17
- package/src/components/FormCardSection.js +288 -233
- package/src/components/FormCardSectionOptionLauncher.js +71 -46
- package/src/components/FormattedText.js +126 -111
- package/src/components/GenericInput.js +165 -136
- package/src/components/GenericInputSection.js +208 -161
- package/src/components/Header.js +620 -474
- package/src/components/ImagePopup.js +271 -221
- package/src/components/ImageUploadProgress.js +48 -41
- package/src/components/ImageUploader.js +923 -797
- package/src/components/InlineButton.js +78 -69
- package/src/components/Input.js +188 -156
- package/src/components/LoadingCircles.js +233 -233
- package/src/components/LoadingIndicator.js +87 -76
- package/src/components/LoadingStateWidget.js +47 -37
- package/src/components/MediaPlayer.js +416 -387
- package/src/components/MiddlePopup.js +48 -32
- package/src/components/PDFPopup.js +198 -159
- package/src/components/PlussChat.js +1208 -1025
- package/src/components/PlussChatMessage.js +335 -298
- package/src/components/PlussChatTime.js +56 -53
- package/src/components/Popup.js +137 -116
- package/src/components/PopupMenu.js +140 -110
- package/src/components/PositionedImage.js +281 -237
- package/src/components/ProfilePic.js +122 -113
- package/src/components/RadioButton.js +76 -52
- package/src/components/Reaction.js +133 -96
- package/src/components/Reactions.js +65 -63
- package/src/components/SharingTools.js +135 -122
- package/src/components/Spinner.js +13 -13
- package/src/components/StickyFooter.js +36 -26
- package/src/components/TextStyle.js +40 -40
- package/src/components/TickIcon.js +20 -20
- package/src/components/Toggle.js +73 -73
- package/src/components/TouchableSearchBar.js +67 -50
- package/src/components/UserListPopup.js +161 -124
- package/src/components/UserListing.js +272 -238
- package/src/components/VideoPopup.js +110 -96
- package/src/components/WarningPopup.js +91 -71
- package/src/components/expo-image-picker-multiple/ImageBrowser.js +288 -256
- package/src/components/expo-image-picker-multiple/ImageTile.js +108 -84
- package/src/components/index.js +58 -58
- package/src/components/react-native-expo-image-cropper/ExpoImageManipulator.js +398 -358
- package/src/components/react-native-expo-image-cropper/ImageCropOverlay.js +420 -324
- package/src/config.js +21 -21
- package/src/constants.js +8 -8
- package/src/fonts/index.js +2 -1
- package/src/fonts/pluss-icons.js +6 -0
- package/src/fonts/pluss-icons.json +1737 -0
- package/src/fonts/pluss60-icons.js +3 -3
- package/src/fonts/pluss60-icons.json +1588 -1095
- package/src/helper.js +468 -438
- package/src/index.js +24 -12
- package/src/js/images/detectFaces.js +27 -20
- package/src/js/images/findLandmarkRange.js +97 -90
- package/src/js/images/getScaledOffset.js +80 -75
- package/src/js/site/getSiteLevelFromState.js +26 -26
- package/src/js/site/isTVEnabled.js +10 -10
- package/src/session.js +32 -32
- package/src/styles.js +61 -61
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _ from
|
|
2
|
-
import { LOAD_FOLLOWERS, ADD_FOLLOWER, REMOVE_FOLLOWER } from
|
|
3
|
-
import { followerActions } from
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { LOAD_FOLLOWERS, ADD_FOLLOWER, REMOVE_FOLLOWER } from "./types";
|
|
3
|
+
import { followerActions } from "../apis/followerActions";
|
|
4
4
|
export const loadFollowers = followers => {
|
|
5
5
|
return {
|
|
6
6
|
type: LOAD_FOLLOWERS,
|
|
@@ -15,7 +15,7 @@ export const getFollowers = userId => {
|
|
|
15
15
|
dispatch(loadFollowers(res.data.Items));
|
|
16
16
|
}
|
|
17
17
|
}).catch(error => {
|
|
18
|
-
console.log(
|
|
18
|
+
console.log("getFollowing", error);
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_","LOAD_FOLLOWERS","ADD_FOLLOWER","REMOVE_FOLLOWER","followerActions","loadFollowers","followers","type","payload","getFollowers","userId","dispatch","getFollowing","then","res","data","Items","isEmpty","catch","error","console","log","addFollower","user","removeFollower"],"sources":["FollowerActions.js"],"sourcesContent":["import _ from
|
|
1
|
+
{"version":3,"names":["_","LOAD_FOLLOWERS","ADD_FOLLOWER","REMOVE_FOLLOWER","followerActions","loadFollowers","followers","type","payload","getFollowers","userId","dispatch","getFollowing","then","res","data","Items","isEmpty","catch","error","console","log","addFollower","user","removeFollower"],"sources":["FollowerActions.js"],"sourcesContent":["import _ from \"lodash\";\nimport { LOAD_FOLLOWERS, ADD_FOLLOWER, REMOVE_FOLLOWER } from \"./types\";\nimport { followerActions } from \"../apis/followerActions\";\n\nexport const loadFollowers = (followers) => {\n\treturn {\n\t\ttype: LOAD_FOLLOWERS,\n\t\tpayload: followers,\n\t};\n};\n\nexport const getFollowers = (userId) => {\n\treturn async (dispatch) => {\n\t\tfollowerActions\n\t\t\t.getFollowing(userId)\n\t\t\t.then((res) => {\n\t\t\t\t// console.log('getFollowing', res.data);\n\t\t\t\tif (\n\t\t\t\t\tres.data != null &&\n\t\t\t\t\tres.data.Items != null &&\n\t\t\t\t\t!_.isEmpty(res.data.Items)\n\t\t\t\t) {\n\t\t\t\t\tdispatch(loadFollowers(res.data.Items));\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.log(\"getFollowing\", error);\n\t\t\t});\n\t};\n};\n\nexport const addFollower = (user) => {\n\treturn {\n\t\ttype: ADD_FOLLOWER,\n\t\tpayload: user,\n\t};\n};\n\nexport const removeFollower = (userId) => {\n\treturn {\n\t\ttype: REMOVE_FOLLOWER,\n\t\tpayload: userId,\n\t};\n};\n"],"mappings":"AAAA,OAAOA,CAAC,MAAM,QAAQ;AACtB,SAASC,cAAc,EAAEC,YAAY,EAAEC,eAAe,QAAQ,SAAS;AACvE,SAASC,eAAe,QAAQ,yBAAyB;AAEzD,OAAO,MAAMC,aAAa,GAAIC,SAAS,IAAK;EAC3C,OAAO;IACNC,IAAI,EAAEN,cAAc;IACpBO,OAAO,EAAEF;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMG,YAAY,GAAIC,MAAM,IAAK;EACvC,OAAO,MAAOC,QAAQ,IAAK;IAC1BP,eAAe,CACbQ,YAAY,CAACF,MAAM,CAAC,CACpBG,IAAI,CAAEC,GAAG,IAAK;MACd;MACA,IACCA,GAAG,CAACC,IAAI,IAAI,IAAI,IAChBD,GAAG,CAACC,IAAI,CAACC,KAAK,IAAI,IAAI,IACtB,CAAChB,CAAC,CAACiB,OAAO,CAACH,GAAG,CAACC,IAAI,CAACC,KAAK,CAAC,EACzB;QACDL,QAAQ,CAACN,aAAa,CAACS,GAAG,CAACC,IAAI,CAACC,KAAK,CAAC,CAAC;MACxC;IACD,CAAC,CAAC,CACDE,KAAK,CAAEC,KAAK,IAAK;MACjBC,OAAO,CAACC,GAAG,CAAC,cAAc,EAAEF,KAAK,CAAC;IACnC,CAAC,CAAC;EACJ,CAAC;AACF,CAAC;AAED,OAAO,MAAMG,WAAW,GAAIC,IAAI,IAAK;EACpC,OAAO;IACNhB,IAAI,EAAEL,YAAY;IAClBM,OAAO,EAAEe;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMC,cAAc,GAAId,MAAM,IAAK;EACzC,OAAO;IACNH,IAAI,EAAEJ,eAAe;IACrBK,OAAO,EAAEE;EACV,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMAGE_LIBRARY_LOADED, STOCK_IMAGES_LOADED, IMAGE_FOLDER_UPDATED, SAVE_IMAGE_POSITION } from
|
|
1
|
+
import { IMAGE_LIBRARY_LOADED, STOCK_IMAGES_LOADED, IMAGE_FOLDER_UPDATED, SAVE_IMAGE_POSITION } from "./types";
|
|
2
2
|
export const stockImagesLoaded = images => {
|
|
3
3
|
return {
|
|
4
4
|
type: STOCK_IMAGES_LOADED,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IMAGE_LIBRARY_LOADED","STOCK_IMAGES_LOADED","IMAGE_FOLDER_UPDATED","SAVE_IMAGE_POSITION","stockImagesLoaded","images","type","payload","imageLibraryLoaded","library","imageFolderUpdated","folder","saveImagePosition","uri","positions"],"sources":["MediaActions.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":["IMAGE_LIBRARY_LOADED","STOCK_IMAGES_LOADED","IMAGE_FOLDER_UPDATED","SAVE_IMAGE_POSITION","stockImagesLoaded","images","type","payload","imageLibraryLoaded","library","imageFolderUpdated","folder","saveImagePosition","uri","positions"],"sources":["MediaActions.js"],"sourcesContent":["import {\n\tIMAGE_LIBRARY_LOADED,\n\tSTOCK_IMAGES_LOADED,\n\tIMAGE_FOLDER_UPDATED,\n\tSAVE_IMAGE_POSITION,\n} from \"./types\";\n\nexport const stockImagesLoaded = (images) => {\n\treturn {\n\t\ttype: STOCK_IMAGES_LOADED,\n\t\tpayload: images,\n\t};\n};\n\nexport const imageLibraryLoaded = (library) => {\n\treturn {\n\t\ttype: IMAGE_LIBRARY_LOADED,\n\t\tpayload: library,\n\t};\n};\n\nexport const imageFolderUpdated = (folder) => {\n\treturn {\n\t\ttype: IMAGE_FOLDER_UPDATED,\n\t\tpayload: folder,\n\t};\n};\n\nexport const saveImagePosition = (uri, positions) => {\n\treturn {\n\t\ttype: SAVE_IMAGE_POSITION,\n\t\tpayload: { uri, positions },\n\t};\n};\n"],"mappings":"AAAA,SACCA,oBAAoB,EACpBC,mBAAmB,EACnBC,oBAAoB,EACpBC,mBAAmB,QACb,SAAS;AAEhB,OAAO,MAAMC,iBAAiB,GAAIC,MAAM,IAAK;EAC5C,OAAO;IACNC,IAAI,EAAEL,mBAAmB;IACzBM,OAAO,EAAEF;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMG,kBAAkB,GAAIC,OAAO,IAAK;EAC9C,OAAO;IACNH,IAAI,EAAEN,oBAAoB;IAC1BO,OAAO,EAAEE;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAIC,MAAM,IAAK;EAC7C,OAAO;IACNL,IAAI,EAAEJ,oBAAoB;IAC1BK,OAAO,EAAEI;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,GAAG,EAAEC,SAAS,KAAK;EACpD,OAAO;IACNR,IAAI,EAAEH,mBAAmB;IACzBI,OAAO,EAAE;MAAEM,GAAG;MAAEC;IAAU;EAC3B,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UPDATE_RESIDENTS, LOADED_RESIDENTS, LOADED_LINKED_USERS, LOADED_LINKED_TO_USERS } from
|
|
1
|
+
import { UPDATE_RESIDENTS, LOADED_RESIDENTS, LOADED_LINKED_USERS, LOADED_LINKED_TO_USERS } from "./types";
|
|
2
2
|
export const updateResidents = userContact => {
|
|
3
3
|
return {
|
|
4
4
|
type: UPDATE_RESIDENTS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UPDATE_RESIDENTS","LOADED_RESIDENTS","LOADED_LINKED_USERS","LOADED_LINKED_TO_USERS","updateResidents","userContact","type","payload","residentsLoaded","list","linkedUsersLoaded","linkedUsers","linkedToUsersLoaded","linkedToUsers"],"sources":["ResidentActions.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":["UPDATE_RESIDENTS","LOADED_RESIDENTS","LOADED_LINKED_USERS","LOADED_LINKED_TO_USERS","updateResidents","userContact","type","payload","residentsLoaded","list","linkedUsersLoaded","linkedUsers","linkedToUsersLoaded","linkedToUsers"],"sources":["ResidentActions.js"],"sourcesContent":["import {\n\tUPDATE_RESIDENTS,\n\tLOADED_RESIDENTS,\n\tLOADED_LINKED_USERS,\n\tLOADED_LINKED_TO_USERS,\n} from \"./types\";\n\nexport const updateResidents = (userContact) => {\n\treturn {\n\t\ttype: UPDATE_RESIDENTS,\n\t\tpayload: userContact,\n\t};\n};\n\nexport const residentsLoaded = (list) => {\n\treturn {\n\t\ttype: LOADED_RESIDENTS,\n\t\tpayload: list,\n\t};\n};\n\nexport const linkedUsersLoaded = (linkedUsers) => {\n\treturn {\n\t\ttype: LOADED_LINKED_USERS,\n\t\tpayload: linkedUsers,\n\t};\n};\n\nexport const linkedToUsersLoaded = (linkedToUsers) => {\n\treturn {\n\t\ttype: LOADED_LINKED_TO_USERS,\n\t\tpayload: linkedToUsers,\n\t};\n};\n"],"mappings":"AAAA,SACCA,gBAAgB,EAChBC,gBAAgB,EAChBC,mBAAmB,EACnBC,sBAAsB,QAChB,SAAS;AAEhB,OAAO,MAAMC,eAAe,GAAIC,WAAW,IAAK;EAC/C,OAAO;IACNC,IAAI,EAAEN,gBAAgB;IACtBO,OAAO,EAAEF;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMG,eAAe,GAAIC,IAAI,IAAK;EACxC,OAAO;IACNH,IAAI,EAAEL,gBAAgB;IACtBM,OAAO,EAAEE;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAIC,WAAW,IAAK;EACjD,OAAO;IACNL,IAAI,EAAEJ,mBAAmB;IACzBK,OAAO,EAAEI;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMC,mBAAmB,GAAIC,aAAa,IAAK;EACrD,OAAO;IACNP,IAAI,EAAEH,sBAAsB;IAC5BI,OAAO,EAAEM;EACV,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UPDATE_USER_STATE","softUpdateUser","input","type","payload","updateNavRead","dispatch","setTimeout","openedNotifs"],"sources":["UserActions.js"],"sourcesContent":["// import axios from 'axios';\nimport {\n
|
|
1
|
+
{"version":3,"names":["UPDATE_USER_STATE","softUpdateUser","input","type","payload","updateNavRead","dispatch","setTimeout","openedNotifs"],"sources":["UserActions.js"],"sourcesContent":["// import axios from 'axios';\nimport {\n\t// SAVE_PROFILE_PIC_SUCCESS,\n\t// SAVE_PROFILE_PIC_FAIL,\n\t// ONBOARDING_UPDATE,\n\t// HOME_ONBOARDING_UPDATE,\n\t// USER_UPDATED,\n\tUPDATE_USER_STATE,\n\t// UPDATE_USER_STATE_FAIL,\n} from \"./types\";\n// import { baseUrl } from '../config';\n// import { userActions } from '../webapi';\n\n// const ROOT_URL = baseUrl;\n\n// export const updateProfilePic = uri => {\n// return async dispatch => {\n// let userID = null;\n// let token = null;\n// if (userID) {\n// dispatch({\n// type: SAVE_PROFILE_PIC_SUCCESS,\n// payload: { profilePic: uri },\n// });\n// await axios({\n// method: 'post',\n// url: `${ROOT_URL}/updateProfilePic`,\n// data: {\n// uri,\n// userID,\n// },\n// headers: {\n// authorization: `Bearer ${token}`,\n// },\n// })\n// .then(() => {\n// dispatch({\n// type: SAVE_PROFILE_PIC_SUCCESS,\n// payload: { profilePic: uri },\n// });\n// })\n// .catch(error => {\n// console.log(error.response.data);\n// dispatch({ type: SAVE_PROFILE_PIC_FAIL });\n// });\n// }\n// };\n// };\n\n// export const updateUser = (input, callback) => {\n// return async dispatch => {\n// console.log('update User Action hit');\n// dispatch({\n// type: USER_UPDATED,\n// payload: input,\n// });\n// };\n// };\n\nexport const softUpdateUser = (input) => {\n\treturn {\n\t\ttype: UPDATE_USER_STATE,\n\t\tpayload: input,\n\t};\n};\n\nexport const updateNavRead = (input) => {\n\treturn async (dispatch) => {\n\t\tsetTimeout(() => {\n\t\t\tdispatch({\n\t\t\t\ttype: UPDATE_USER_STATE,\n\t\t\t\tpayload: { openedNotifs: input },\n\t\t\t});\n\t\t}, 500);\n\t};\n};\n\n/* \nUpdate user data without triggering uploadingProfile or uploadingProfilePic\n*/\n// export const silentUpdateUser = (input, immediate) => {\n// return async dispatch => {\n// if (immediate) {\n// dispatch({\n// type: UPDATE_USER_STATE,\n// payload: input,\n// });\n// }\n// userActions\n// .updateProfile(input)\n// .then(res => {\n// if (res.data.userCreationFail) {\n// console.log('user update failed', res.data.message);\n// dispatch({\n// type: UPDATE_USER_STATE_FAIL,\n// payload: res.data.message,\n// });\n// } else {\n// dispatch({\n// type: UPDATE_USER_STATE,\n// payload: input,\n// });\n// }\n// })\n// .catch(err => {\n// console.log('user update fail -- Silent Upate', err);\n// });\n// };\n// };\n\n// export const seenOnboarding = () => {\n// return async dispatch => {\n// dispatch({ type: ONBOARDING_UPDATE });\n// let userID = null;\n// let token = null;\n// if (userID) {\n// await axios({\n// method: 'post',\n// url: `${ROOT_URL}/updateProfile`,\n// data: {\n// userID,\n// details: {\n// onBoardingSeen: true,\n// },\n// },\n// headers: {\n// authorization: `Bearer ${token}`,\n// },\n// })\n// .then(() => {})\n// .catch(() => {\n// console.log('onBoarding update fail');\n// });\n// }\n// };\n// };\n\n/* \n Will combine this eventually with above function\n*/\n// export const seenHomeOnboarding = () => {\n// return async dispatch => {\n// dispatch({ type: HOME_ONBOARDING_UPDATE });\n// let userID = null;\n// let token = null;\n// if (userID) {\n// await axios({\n// method: 'post',\n// url: `${ROOT_URL}/updateProfile`,\n// data: {\n// userID,\n// details: {\n// homeOnboardingSeen: true,\n// },\n// },\n// headers: {\n// authorization: `Bearer ${token}`,\n// },\n// })\n// .then(() => {})\n// .catch(() => {\n// console.log('onBoarding update fail');\n// });\n// }\n// };\n// };\n\n/* \nTriggered at app startup for saving user current home takeover. \n*/\n// export const updateUserStartupTakeover = async input => {\n// let userID = null;\n// let token = null;\n// if (userID) {\n// await axios({\n// method: 'post',\n// url: `${ROOT_URL}/updateProfile`,\n// data: {\n// userID,\n// details: input,\n// },\n// headers: {\n// authorization: `Bearer ${token}`,\n// },\n// })\n// .then(() => {})\n// .catch(() => {\n// console.log('startup takeover save fail -- Update User Startup Takeover');\n// });\n// }\n// };\n\n// export const registerStandaloneUser = takeover => {\n// return async dispatch => {\n// let userObj = null;\n// if (userObj && takeover) {\n// await axios({\n// method: 'post',\n// url: `${ROOT_URL}/registerStandaloneUser`,\n// data: {\n// userObj,\n// takeoverKey: takeover.Key,\n// },\n// headers: {\n// authorization: 'Gweg',\n// },\n// })\n// .then(() => {\n// dispatch({\n// type: UPDATE_USER_STATE,\n// payload: { standaloneRegistered: true },\n// });\n// })\n// .catch(() => {\n// console.log('register standalone user -- fail');\n// });\n// } else {\n// console.log('Failed to detect user for takeover registration');\n// }\n// };\n// };\n"],"mappings":"AAAA;AACA;AACC;AACA;AACA;AACA;AACA;AACAA;AACA;AAAA,OACM,SAAS;AAChB;AACA;;AAEA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,cAAc,GAAIC,KAAK,IAAK;EACxC,OAAO;IACNC,IAAI,EAAEH,iBAAiB;IACvBI,OAAO,EAAEF;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMG,aAAa,GAAIH,KAAK,IAAK;EACvC,OAAO,MAAOI,QAAQ,IAAK;IAC1BC,UAAU,CAAC,MAAM;MAChBD,QAAQ,CAAC;QACRH,IAAI,EAAEH,iBAAiB;QACvBI,OAAO,EAAE;UAAEI,YAAY,EAAEN;QAAM;MAChC,CAAC,CAAC;IACH,CAAC,EAAE,GAAG,CAAC;EACR,CAAC;AACF,CAAC;;AAED;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;;AAEA;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;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BLOCK_USER","UNBLOCK_USER","blockUser","userId","type","payload","unblockUser"],"sources":["UserSettingsActions.js"],"sourcesContent":["import { BLOCK_USER, UNBLOCK_USER } from
|
|
1
|
+
{"version":3,"names":["BLOCK_USER","UNBLOCK_USER","blockUser","userId","type","payload","unblockUser"],"sources":["UserSettingsActions.js"],"sourcesContent":["import { BLOCK_USER, UNBLOCK_USER } from \"./types\";\n\nexport const blockUser = (userId) => {\n\treturn {\n\t\ttype: BLOCK_USER,\n\t\tpayload: userId,\n\t};\n};\n\nexport const unblockUser = (userId) => {\n\treturn {\n\t\ttype: UNBLOCK_USER,\n\t\tpayload: userId,\n\t};\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,SAAS;AAElD,OAAO,MAAMC,SAAS,GAAIC,MAAM,IAAK;EACpC,OAAO;IACNC,IAAI,EAAEJ,UAAU;IAChBK,OAAO,EAAEF;EACV,CAAC;AACF,CAAC;AAED,OAAO,MAAMG,WAAW,GAAIH,MAAM,IAAK;EACtC,OAAO;IACNC,IAAI,EAAEH,YAAY;IAClBI,OAAO,EAAEF;EACV,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./MediaActions";
|
|
2
|
+
export * from "./FollowerActions";
|
|
3
|
+
export * from "./ResidentActions";
|
|
4
|
+
export * from "./UserActions";
|
|
5
|
+
export * from "./UserSettingsActions";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.js"],"sourcesContent":["export * from
|
|
1
|
+
{"version":3,"names":[],"sources":["index.js"],"sourcesContent":["export * from \"./MediaActions\";\nexport * from \"./FollowerActions\";\nexport * from \"./ResidentActions\";\nexport * from \"./UserActions\";\nexport * from \"./UserSettingsActions\";\n"],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC,cAAc,eAAe;AAC7B,cAAc,uBAAuB","ignoreList":[]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export const LOGOUT =
|
|
2
|
-
export const CHANGE_ROLE =
|
|
3
|
-
export const IMAGE_LIBRARY_LOADED =
|
|
4
|
-
export const STOCK_IMAGES_LOADED =
|
|
5
|
-
export const IMAGE_FOLDER_UPDATED =
|
|
6
|
-
export const SAVE_IMAGE_POSITION =
|
|
7
|
-
export const LOAD_FOLLOWERS =
|
|
8
|
-
export const ADD_FOLLOWER =
|
|
9
|
-
export const REMOVE_FOLLOWER =
|
|
10
|
-
export const UPDATE_RESIDENTS =
|
|
11
|
-
export const LOADED_RESIDENTS =
|
|
12
|
-
export const LOADED_LINKED_USERS =
|
|
13
|
-
export const LOADED_LINKED_TO_USERS =
|
|
14
|
-
export const UPDATE_USER_STATE =
|
|
15
|
-
export const BLOCK_USER =
|
|
16
|
-
export const UNBLOCK_USER =
|
|
1
|
+
export const LOGOUT = "LOGOUT";
|
|
2
|
+
export const CHANGE_ROLE = "CHANGE_ROLE";
|
|
3
|
+
export const IMAGE_LIBRARY_LOADED = "IMAGE_LIBRARY_LOADED";
|
|
4
|
+
export const STOCK_IMAGES_LOADED = "STOCK_IMAGES_LOADED";
|
|
5
|
+
export const IMAGE_FOLDER_UPDATED = "IMAGE_FOLDER_UPDATED";
|
|
6
|
+
export const SAVE_IMAGE_POSITION = "SAVE_IMAGE_POSITION";
|
|
7
|
+
export const LOAD_FOLLOWERS = "LOAD_FOLLOWERS";
|
|
8
|
+
export const ADD_FOLLOWER = "ADD_FOLLOWER";
|
|
9
|
+
export const REMOVE_FOLLOWER = "REMOVE_FOLLOWER";
|
|
10
|
+
export const UPDATE_RESIDENTS = "UPDATE_RESIDENTS";
|
|
11
|
+
export const LOADED_RESIDENTS = "LOADED_RESIDENTS";
|
|
12
|
+
export const LOADED_LINKED_USERS = "LOADED_LINKED_USERS";
|
|
13
|
+
export const LOADED_LINKED_TO_USERS = "LOADED_LINKED_TO_USERS";
|
|
14
|
+
export const UPDATE_USER_STATE = "UPDATE_USER_STATE";
|
|
15
|
+
export const BLOCK_USER = "BLOCK_USER";
|
|
16
|
+
export const UNBLOCK_USER = "UNBLOCK_USER";
|
|
17
17
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LOGOUT","CHANGE_ROLE","IMAGE_LIBRARY_LOADED","STOCK_IMAGES_LOADED","IMAGE_FOLDER_UPDATED","SAVE_IMAGE_POSITION","LOAD_FOLLOWERS","ADD_FOLLOWER","REMOVE_FOLLOWER","UPDATE_RESIDENTS","LOADED_RESIDENTS","LOADED_LINKED_USERS","LOADED_LINKED_TO_USERS","UPDATE_USER_STATE","BLOCK_USER","UNBLOCK_USER"],"sources":["types.js"],"sourcesContent":["export const LOGOUT =
|
|
1
|
+
{"version":3,"names":["LOGOUT","CHANGE_ROLE","IMAGE_LIBRARY_LOADED","STOCK_IMAGES_LOADED","IMAGE_FOLDER_UPDATED","SAVE_IMAGE_POSITION","LOAD_FOLLOWERS","ADD_FOLLOWER","REMOVE_FOLLOWER","UPDATE_RESIDENTS","LOADED_RESIDENTS","LOADED_LINKED_USERS","LOADED_LINKED_TO_USERS","UPDATE_USER_STATE","BLOCK_USER","UNBLOCK_USER"],"sources":["types.js"],"sourcesContent":["export const LOGOUT = \"LOGOUT\";\nexport const CHANGE_ROLE = \"CHANGE_ROLE\";\nexport const IMAGE_LIBRARY_LOADED = \"IMAGE_LIBRARY_LOADED\";\nexport const STOCK_IMAGES_LOADED = \"STOCK_IMAGES_LOADED\";\nexport const IMAGE_FOLDER_UPDATED = \"IMAGE_FOLDER_UPDATED\";\nexport const SAVE_IMAGE_POSITION = \"SAVE_IMAGE_POSITION\";\nexport const LOAD_FOLLOWERS = \"LOAD_FOLLOWERS\";\nexport const ADD_FOLLOWER = \"ADD_FOLLOWER\";\nexport const REMOVE_FOLLOWER = \"REMOVE_FOLLOWER\";\nexport const UPDATE_RESIDENTS = \"UPDATE_RESIDENTS\";\nexport const LOADED_RESIDENTS = \"LOADED_RESIDENTS\";\nexport const LOADED_LINKED_USERS = \"LOADED_LINKED_USERS\";\nexport const LOADED_LINKED_TO_USERS = \"LOADED_LINKED_TO_USERS\";\nexport const UPDATE_USER_STATE = \"UPDATE_USER_STATE\";\nexport const BLOCK_USER = \"BLOCK_USER\";\nexport const UNBLOCK_USER = \"UNBLOCK_USER\";\n"],"mappings":"AAAA,OAAO,MAAMA,MAAM,GAAG,QAAQ;AAC9B,OAAO,MAAMC,WAAW,GAAG,aAAa;AACxC,OAAO,MAAMC,oBAAoB,GAAG,sBAAsB;AAC1D,OAAO,MAAMC,mBAAmB,GAAG,qBAAqB;AACxD,OAAO,MAAMC,oBAAoB,GAAG,sBAAsB;AAC1D,OAAO,MAAMC,mBAAmB,GAAG,qBAAqB;AACxD,OAAO,MAAMC,cAAc,GAAG,gBAAgB;AAC9C,OAAO,MAAMC,YAAY,GAAG,cAAc;AAC1C,OAAO,MAAMC,eAAe,GAAG,iBAAiB;AAChD,OAAO,MAAMC,gBAAgB,GAAG,kBAAkB;AAClD,OAAO,MAAMC,gBAAgB,GAAG,kBAAkB;AAClD,OAAO,MAAMC,mBAAmB,GAAG,qBAAqB;AACxD,OAAO,MAAMC,sBAAsB,GAAG,wBAAwB;AAC9D,OAAO,MAAMC,iBAAiB,GAAG,mBAAmB;AACpD,OAAO,MAAMC,UAAU,GAAG,YAAY;AACtC,OAAO,MAAMC,YAAY,GAAG,cAAc","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getUrl } from
|
|
2
|
-
import { authedFunction } from
|
|
1
|
+
import { getUrl } from "../helper";
|
|
2
|
+
import { authedFunction } from "../session";
|
|
3
3
|
export const analyticsActions = {
|
|
4
4
|
log: (site, actionType, entityType, entityId, data) => {
|
|
5
5
|
return authedFunction({
|
|
6
|
-
method:
|
|
7
|
-
url: getUrl(
|
|
6
|
+
method: "POST",
|
|
7
|
+
url: getUrl("analytics", "log"),
|
|
8
8
|
data: {
|
|
9
9
|
site,
|
|
10
10
|
actionType,
|
|
@@ -13,7 +13,7 @@ export const analyticsActions = {
|
|
|
13
13
|
data
|
|
14
14
|
}
|
|
15
15
|
}).catch(error => {
|
|
16
|
-
console.log(
|
|
16
|
+
console.log("log error", error);
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getUrl","authedFunction","analyticsActions","log","site","actionType","entityType","entityId","data","method","url","catch","error","console"],"sources":["analyticsActions.js"],"sourcesContent":["import { getUrl } from
|
|
1
|
+
{"version":3,"names":["getUrl","authedFunction","analyticsActions","log","site","actionType","entityType","entityId","data","method","url","catch","error","console"],"sources":["analyticsActions.js"],"sourcesContent":["import { getUrl } from \"../helper\";\nimport { authedFunction } from \"../session\";\n\nexport const analyticsActions = {\n\tlog: (site, actionType, entityType, entityId, data) => {\n\t\treturn authedFunction({\n\t\t\tmethod: \"POST\",\n\t\t\turl: getUrl(\"analytics\", \"log\"),\n\t\t\tdata: {\n\t\t\t\tsite,\n\t\t\t\tactionType,\n\t\t\t\tentityType,\n\t\t\t\tentityId,\n\t\t\t\tdata,\n\t\t\t},\n\t\t}).catch((error) => {\n\t\t\tconsole.log(\"log error\", error);\n\t\t});\n\t},\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,OAAO,MAAMC,gBAAgB,GAAG;EAC/BC,GAAG,EAAEA,CAACC,IAAI,EAAEC,UAAU,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,IAAI,KAAK;IACtD,OAAOP,cAAc,CAAC;MACrBQ,MAAM,EAAE,MAAM;MACdC,GAAG,EAAEV,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC;MAC/BQ,IAAI,EAAE;QACLJ,IAAI;QACJC,UAAU;QACVC,UAAU;QACVC,QAAQ;QACRC;MACD;IACD,CAAC,CAAC,CAACG,KAAK,CAAEC,KAAK,IAAK;MACnBC,OAAO,CAACV,GAAG,CAAC,WAAW,EAAES,KAAK,CAAC;IAChC,CAAC,CAAC;EACH;AACD,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getUrl } from
|
|
2
|
-
import { authedFunction } from
|
|
1
|
+
import { getUrl } from "../helper";
|
|
2
|
+
import { authedFunction } from "../session";
|
|
3
3
|
export const contactActions = {
|
|
4
4
|
getSiteResidents: async site => {
|
|
5
5
|
return authedFunction({
|
|
6
|
-
method:
|
|
7
|
-
url: getUrl(
|
|
6
|
+
method: "POST",
|
|
7
|
+
url: getUrl("users", "getexp"),
|
|
8
8
|
data: {
|
|
9
9
|
site
|
|
10
10
|
}
|
|
@@ -12,8 +12,8 @@ export const contactActions = {
|
|
|
12
12
|
},
|
|
13
13
|
getSingleExpoResidents: async id => {
|
|
14
14
|
return authedFunction({
|
|
15
|
-
method:
|
|
16
|
-
url: getUrl(
|
|
15
|
+
method: "POST",
|
|
16
|
+
url: getUrl("users", "getexpsingle"),
|
|
17
17
|
data: {
|
|
18
18
|
id
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getUrl","authedFunction","contactActions","getSiteResidents","site","method","url","data","getSingleExpoResidents","id","syncContacts","userKey","contacts"],"sources":["contactActions.js"],"sourcesContent":["import { getUrl } from
|
|
1
|
+
{"version":3,"names":["getUrl","authedFunction","contactActions","getSiteResidents","site","method","url","data","getSingleExpoResidents","id","syncContacts","userKey","contacts"],"sources":["contactActions.js"],"sourcesContent":["import { getUrl } from \"../helper\";\nimport { authedFunction } from \"../session\";\n\nexport const contactActions = {\n\tgetSiteResidents: async (site) => {\n\t\treturn authedFunction({\n\t\t\tmethod: \"POST\",\n\t\t\turl: getUrl(\"users\", \"getexp\"),\n\t\t\tdata: { site },\n\t\t});\n\t},\n\tgetSingleExpoResidents: async (id) => {\n\t\treturn authedFunction({\n\t\t\tmethod: \"POST\",\n\t\t\turl: getUrl(\"users\", \"getexpsingle\"),\n\t\t\tdata: { id },\n\t\t});\n\t},\n\tsyncContacts: async (userKey, contacts) => {\n\t\t// deprecated\n\t\treturn null;\n\t},\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,OAAO,MAAMC,cAAc,GAAG;EAC7BC,gBAAgB,EAAE,MAAOC,IAAI,IAAK;IACjC,OAAOH,cAAc,CAAC;MACrBI,MAAM,EAAE,MAAM;MACdC,GAAG,EAAEN,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC;MAC9BO,IAAI,EAAE;QAAEH;MAAK;IACd,CAAC,CAAC;EACH,CAAC;EACDI,sBAAsB,EAAE,MAAOC,EAAE,IAAK;IACrC,OAAOR,cAAc,CAAC;MACrBI,MAAM,EAAE,MAAM;MACdC,GAAG,EAAEN,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC;MACpCO,IAAI,EAAE;QAAEE;MAAG;IACZ,CAAC,CAAC;EACH,CAAC;EACDC,YAAY,EAAE,MAAAA,CAAOC,OAAO,EAAEC,QAAQ,KAAK;IAC1C;IACA,OAAO,IAAI;EACZ;AACD,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getUrl, getAuthTokenHeader } from
|
|
2
|
-
import { authedFunction } from
|
|
1
|
+
import { getUrl, getAuthTokenHeader } from "../helper";
|
|
2
|
+
import { authedFunction } from "../session";
|
|
3
3
|
export const eventActions = {
|
|
4
4
|
addEvent: data => {
|
|
5
5
|
const request = {
|
|
6
|
-
method:
|
|
7
|
-
url: getUrl(
|
|
6
|
+
method: "POST",
|
|
7
|
+
url: getUrl("events", "add"),
|
|
8
8
|
data: {
|
|
9
9
|
event: data
|
|
10
10
|
}
|
|
@@ -19,8 +19,8 @@ export const eventActions = {
|
|
|
19
19
|
query.time = time;
|
|
20
20
|
}
|
|
21
21
|
return authedFunction({
|
|
22
|
-
method:
|
|
23
|
-
url: getUrl(
|
|
22
|
+
method: "GET",
|
|
23
|
+
url: getUrl("events", "get", query)
|
|
24
24
|
});
|
|
25
25
|
},
|
|
26
26
|
getEvent: (site, id) => {
|
|
@@ -28,14 +28,14 @@ export const eventActions = {
|
|
|
28
28
|
site
|
|
29
29
|
};
|
|
30
30
|
return authedFunction({
|
|
31
|
-
method:
|
|
32
|
-
url: getUrl(
|
|
31
|
+
method: "GET",
|
|
32
|
+
url: getUrl("events", `get/${id}`, query)
|
|
33
33
|
});
|
|
34
34
|
},
|
|
35
35
|
getEventReps: (site, eventId) => {
|
|
36
36
|
return authedFunction({
|
|
37
|
-
method:
|
|
38
|
-
url: getUrl(
|
|
37
|
+
method: "GET",
|
|
38
|
+
url: getUrl("eventreps", "get", {
|
|
39
39
|
site,
|
|
40
40
|
eventId
|
|
41
41
|
})
|
|
@@ -43,8 +43,8 @@ export const eventActions = {
|
|
|
43
43
|
},
|
|
44
44
|
getUserEventReps: async time => {
|
|
45
45
|
const request = {
|
|
46
|
-
method:
|
|
47
|
-
url: getUrl(
|
|
46
|
+
method: "GET",
|
|
47
|
+
url: getUrl("usereventreps", "get", time ? {
|
|
48
48
|
time
|
|
49
49
|
} : null),
|
|
50
50
|
headers: {}
|
|
@@ -54,8 +54,8 @@ export const eventActions = {
|
|
|
54
54
|
},
|
|
55
55
|
getUpcomingUserEventReps: async (userId, time) => {
|
|
56
56
|
const request = {
|
|
57
|
-
method:
|
|
58
|
-
url: getUrl(
|
|
57
|
+
method: "GET",
|
|
58
|
+
url: getUrl("usereventreps", "getupcoming", {
|
|
59
59
|
userId,
|
|
60
60
|
time
|
|
61
61
|
}),
|
|
@@ -65,16 +65,16 @@ export const eventActions = {
|
|
|
65
65
|
},
|
|
66
66
|
getSubmissions: async site => {
|
|
67
67
|
return authedFunction({
|
|
68
|
-
method:
|
|
69
|
-
url: getUrl(
|
|
68
|
+
method: "GET",
|
|
69
|
+
url: getUrl("events", "submissions/get", {
|
|
70
70
|
site
|
|
71
71
|
})
|
|
72
72
|
});
|
|
73
73
|
},
|
|
74
74
|
handleEventSubmission: (site, id, action) => {
|
|
75
75
|
return authedFunction({
|
|
76
|
-
method:
|
|
77
|
-
url: getUrl(
|
|
76
|
+
method: "POST",
|
|
77
|
+
url: getUrl("events", "submissions/handle"),
|
|
78
78
|
data: {
|
|
79
79
|
site,
|
|
80
80
|
id,
|
|
@@ -84,8 +84,8 @@ export const eventActions = {
|
|
|
84
84
|
},
|
|
85
85
|
getEventInvites: async () => {
|
|
86
86
|
const request = {
|
|
87
|
-
method:
|
|
88
|
-
url: getUrl(
|
|
87
|
+
method: "GET",
|
|
88
|
+
url: getUrl("eventinvites", "get"),
|
|
89
89
|
headers: {}
|
|
90
90
|
};
|
|
91
91
|
request.headers.authorization = await getAuthTokenHeader();
|
|
@@ -93,8 +93,8 @@ export const eventActions = {
|
|
|
93
93
|
},
|
|
94
94
|
registerForEvent: async (site, userID, eventId, repId, count, notes, waitlistCount, user) => {
|
|
95
95
|
const request = {
|
|
96
|
-
method:
|
|
97
|
-
url: getUrl(
|
|
96
|
+
method: "POST",
|
|
97
|
+
url: getUrl("eventreps", "register"),
|
|
98
98
|
data: {
|
|
99
99
|
userID,
|
|
100
100
|
eventId,
|
|
@@ -110,8 +110,8 @@ export const eventActions = {
|
|
|
110
110
|
},
|
|
111
111
|
removeEventAttendee: async (site, userID, eventId, repId) => {
|
|
112
112
|
const request = {
|
|
113
|
-
method:
|
|
114
|
-
url: getUrl(
|
|
113
|
+
method: "POST",
|
|
114
|
+
url: getUrl("eventreps", "remove"),
|
|
115
115
|
data: {
|
|
116
116
|
site,
|
|
117
117
|
userID,
|
|
@@ -129,8 +129,8 @@ export const eventActions = {
|
|
|
129
129
|
},
|
|
130
130
|
sendEventInvite: async (site, userID, inviteId, eventId, repId) => {
|
|
131
131
|
const request = {
|
|
132
|
-
method:
|
|
133
|
-
url: getUrl(
|
|
132
|
+
method: "POST",
|
|
133
|
+
url: getUrl("eventinvites", "send"),
|
|
134
134
|
data: {
|
|
135
135
|
site,
|
|
136
136
|
userID,
|
|
@@ -145,8 +145,8 @@ export const eventActions = {
|
|
|
145
145
|
},
|
|
146
146
|
removeEventInvite: async (userID, site, eventId, repId) => {
|
|
147
147
|
const request = {
|
|
148
|
-
method:
|
|
149
|
-
url: getUrl(
|
|
148
|
+
method: "POST",
|
|
149
|
+
url: getUrl("eventinvites", "remove"),
|
|
150
150
|
data: {
|
|
151
151
|
site,
|
|
152
152
|
eventId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getUrl","getAuthTokenHeader","authedFunction","eventActions","addEvent","data","request","method","url","event","getEvents","site","time","query","getEvent","id","getEventReps","eventId","getUserEventReps","headers","authorization","getUpcomingUserEventReps","userId","getSubmissions","handleEventSubmission","action","getEventInvites","registerForEvent","userID","repId","count","notes","waitlistCount","user","removeEventAttendee","addEventFeedback","feedback","rating","sendEventInvite","inviteId","removeEventInvite"],"sources":["eventActions.js"],"sourcesContent":["import { getUrl, getAuthTokenHeader } from
|
|
1
|
+
{"version":3,"names":["getUrl","getAuthTokenHeader","authedFunction","eventActions","addEvent","data","request","method","url","event","getEvents","site","time","query","getEvent","id","getEventReps","eventId","getUserEventReps","headers","authorization","getUpcomingUserEventReps","userId","getSubmissions","handleEventSubmission","action","getEventInvites","registerForEvent","userID","repId","count","notes","waitlistCount","user","removeEventAttendee","addEventFeedback","feedback","rating","sendEventInvite","inviteId","removeEventInvite"],"sources":["eventActions.js"],"sourcesContent":["import { getUrl, getAuthTokenHeader } from \"../helper\";\nimport { authedFunction } from \"../session\";\n\nexport const eventActions = {\n\taddEvent: (data) => {\n\t\tconst request = {\n\t\t\tmethod: \"POST\",\n\t\t\turl: getUrl(\"events\", \"add\"),\n\t\t\tdata: {\n\t\t\t\tevent: data,\n\t\t\t},\n\t\t};\n\t\treturn authedFunction(request);\n\t},\n\tgetEvents: (site, time) => {\n\t\tconst query = {\n\t\t\tsite,\n\t\t};\n\t\tif (time) {\n\t\t\tquery.time = time;\n\t\t}\n\t\treturn authedFunction({\n\t\t\tmethod: \"GET\",\n\t\t\turl: getUrl(\"events\", \"get\", query),\n\t\t});\n\t},\n\tgetEvent: (site, id) => {\n\t\tconst query = {\n\t\t\tsite,\n\t\t};\n\t\treturn authedFunction({\n\t\t\tmethod: \"GET\",\n\t\t\turl: getUrl(\"events\", `get/${id}`, query),\n\t\t});\n\t},\n\tgetEventReps: (site, eventId) => {\n\t\treturn authedFunction({\n\t\t\tmethod: \"GET\",\n\t\t\turl: getUrl(\"eventreps\", \"get\", { site, eventId }),\n\t\t});\n\t},\n\tgetUserEventReps: async (time) => {\n\t\tconst request = {\n\t\t\tmethod: \"GET\",\n\t\t\turl: getUrl(\"usereventreps\", \"get\", time ? { time } : null),\n\t\t\theaders: {},\n\t\t};\n\t\trequest.headers.authorization = await getAuthTokenHeader();\n\t\treturn authedFunction(request);\n\t},\n\tgetUpcomingUserEventReps: async (userId, time) => {\n\t\tconst request = {\n\t\t\tmethod: \"GET\",\n\t\t\turl: getUrl(\"usereventreps\", \"getupcoming\", { userId, time }),\n\t\t\theaders: {},\n\t\t};\n\t\treturn authedFunction(request);\n\t},\n\tgetSubmissions: async (site) => {\n\t\treturn authedFunction({\n\t\t\tmethod: \"GET\",\n\t\t\turl: getUrl(\"events\", \"submissions/get\", { site }),\n\t\t});\n\t},\n\thandleEventSubmission: (site, id, action) => {\n\t\treturn authedFunction({\n\t\t\tmethod: \"POST\",\n\t\t\turl: getUrl(\"events\", \"submissions/handle\"),\n\t\t\tdata: {\n\t\t\t\tsite,\n\t\t\t\tid,\n\t\t\t\taction,\n\t\t\t},\n\t\t});\n\t},\n\tgetEventInvites: async () => {\n\t\tconst request = {\n\t\t\tmethod: \"GET\",\n\t\t\turl: getUrl(\"eventinvites\", \"get\"),\n\t\t\theaders: {},\n\t\t};\n\t\trequest.headers.authorization = await getAuthTokenHeader();\n\t\treturn authedFunction(request);\n\t},\n\tregisterForEvent: async (\n\t\tsite,\n\t\tuserID,\n\t\teventId,\n\t\trepId,\n\t\tcount,\n\t\tnotes,\n\t\twaitlistCount,\n\t\tuser,\n\t) => {\n\t\tconst request = {\n\t\t\tmethod: \"POST\",\n\t\t\turl: getUrl(\"eventreps\", \"register\"),\n\t\t\tdata: {\n\t\t\t\tuserID,\n\t\t\t\teventId,\n\t\t\t\trepId,\n\t\t\t\tsite,\n\t\t\t\tcount,\n\t\t\t\tnotes,\n\t\t\t\twaitlistCount,\n\t\t\t\tuser,\n\t\t\t},\n\t\t};\n\t\treturn authedFunction(request);\n\t},\n\tremoveEventAttendee: async (site, userID, eventId, repId) => {\n\t\tconst request = {\n\t\t\tmethod: \"POST\",\n\t\t\turl: getUrl(\"eventreps\", \"remove\"),\n\t\t\tdata: {\n\t\t\t\tsite,\n\t\t\t\tuserID,\n\t\t\t\teventId,\n\t\t\t\trepId,\n\t\t\t},\n\t\t\theaders: {},\n\t\t};\n\t\trequest.headers.authorization = await getAuthTokenHeader();\n\t\treturn authedFunction(request);\n\t},\n\taddEventFeedback: async (site, userID, eventId, repId, feedback, rating) => {\n\t\t// deprecated\n\t\treturn null;\n\t},\n\tsendEventInvite: async (site, userID, inviteId, eventId, repId) => {\n\t\tconst request = {\n\t\t\tmethod: \"POST\",\n\t\t\turl: getUrl(\"eventinvites\", \"send\"),\n\t\t\tdata: {\n\t\t\t\tsite,\n\t\t\t\tuserID,\n\t\t\t\tinviteId,\n\t\t\t\teventId,\n\t\t\t\trepId,\n\t\t\t},\n\t\t\theaders: {},\n\t\t};\n\t\trequest.headers.authorization = await getAuthTokenHeader();\n\t\treturn authedFunction(request);\n\t},\n\tremoveEventInvite: async (userID, site, eventId, repId) => {\n\t\tconst request = {\n\t\t\tmethod: \"POST\",\n\t\t\turl: getUrl(\"eventinvites\", \"remove\"),\n\t\t\tdata: { site, eventId, repId },\n\t\t\theaders: {},\n\t\t};\n\t\trequest.headers.authorization = await getAuthTokenHeader();\n\t\treturn authedFunction(request);\n\t},\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import mime from
|
|
2
|
-
import { Storage } from
|
|
3
|
-
import { getUrl, generateImageName, randomString } from
|
|
4
|
-
import { authedFunction } from
|
|
5
|
-
import Config from
|
|
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
6
|
export const fileActions = {
|
|
7
7
|
getUploadUrl: (userId, fileName) => {
|
|
8
|
-
const newFilename = fileName.replace(/[^a-z0-9+.]+/gi,
|
|
8
|
+
const newFilename = fileName.replace(/[^a-z0-9+.]+/gi, "").toLowerCase();
|
|
9
9
|
return `uploads/users/${userId}/public/${randomString()}/${newFilename}`;
|
|
10
10
|
},
|
|
11
11
|
uploadUserMediaWithProgress: async (imageUri, url, progressCallback = null) => {
|
|
12
12
|
const blob = await fileActions.imageToBlob(imageUri);
|
|
13
|
-
return fileActions.uploadBlobAWS(Config.env.awsUploadsBucket, url, blob,
|
|
13
|
+
return fileActions.uploadBlobAWS(Config.env.awsUploadsBucket, url, blob, "", progressCallback);
|
|
14
14
|
},
|
|
15
15
|
// uploadUserMedia: async (userId, image, fileName) => {
|
|
16
16
|
// const blob = await fileActions.imageToBlob(image.uri);
|
|
@@ -26,15 +26,15 @@ export const fileActions = {
|
|
|
26
26
|
const response = await fetch(imageUri);
|
|
27
27
|
return response.blob();
|
|
28
28
|
},
|
|
29
|
-
uploadBlobAWS: (bucket, uri, blob, prefix =
|
|
30
|
-
const imageName = prefix ? uri.replace(/^.*[\\/]/,
|
|
29
|
+
uploadBlobAWS: (bucket, uri, blob, prefix = "", progressCallback = null) => {
|
|
30
|
+
const imageName = prefix ? uri.replace(/^.*[\\/]/, "") : uri;
|
|
31
31
|
const fileType = mime.lookup(uri);
|
|
32
32
|
const access = {
|
|
33
|
-
level:
|
|
33
|
+
level: "public",
|
|
34
34
|
bucket,
|
|
35
35
|
contentType: fileType,
|
|
36
36
|
customPrefix: {
|
|
37
|
-
public:
|
|
37
|
+
public: ""
|
|
38
38
|
},
|
|
39
39
|
progressCallback: progress => progressCallback && progressCallback({
|
|
40
40
|
uri,
|
|
@@ -47,8 +47,8 @@ export const fileActions = {
|
|
|
47
47
|
},
|
|
48
48
|
getStockPhotos: async () => {
|
|
49
49
|
const response = await authedFunction({
|
|
50
|
-
method:
|
|
51
|
-
url:
|
|
50
|
+
method: "GET",
|
|
51
|
+
url: "https://pluss60.pluss60-api.com/media-demo/library"
|
|
52
52
|
});
|
|
53
53
|
// Convert to images object
|
|
54
54
|
const images = response.data.map(image => {
|
|
@@ -63,8 +63,8 @@ export const fileActions = {
|
|
|
63
63
|
site
|
|
64
64
|
};
|
|
65
65
|
return authedFunction({
|
|
66
|
-
method:
|
|
67
|
-
url: getUrl(
|
|
66
|
+
method: "GET",
|
|
67
|
+
url: getUrl("media", "folders", query)
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
// addMediaFolder: (site, name, images) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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"],"sources":["fileActions.js"],"sourcesContent":["import mime from
|
|
1
|
+
{"version":3,"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"],"sources":["fileActions.js"],"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\tgetUploadUrl: (userId, fileName) => {\n\t\tconst newFilename = fileName.replace(/[^a-z0-9+.]+/gi, \"\").toLowerCase();\n\t\treturn `uploads/users/${userId}/public/${randomString()}/${newFilename}`;\n\t},\n\tuploadUserMediaWithProgress: async (\n\t\timageUri,\n\t\turl,\n\t\tprogressCallback = null,\n\t) => {\n\t\tconst blob = await fileActions.imageToBlob(imageUri);\n\t\treturn fileActions.uploadBlobAWS(\n\t\t\tConfig.env.awsUploadsBucket,\n\t\t\turl,\n\t\t\tblob,\n\t\t\t\"\",\n\t\t\tprogressCallback,\n\t\t);\n\t},\n\t// uploadUserMedia: async (userId, image, fileName) => {\n\t// const blob = await fileActions.imageToBlob(image.uri);\n\t// const url = fileActions.getUploadUrl(userId, fileName);\n\t// return fileActions.uploadBlobAWS(Config.env.awsUploadsBucket, url, blob);\n\t// },\n\t// uploadSignatureImage: async (image, name) => {\n\t// const blob = await fileActions.imageToBlob(image);\n\t// const newImageName = generateImageName(name, 'signature.png');\n\t// return fileActions.uploadBlobAWS(Config.env.awsStorageBucket, newImageName, blob, 'images/');\n\t// },\n\timageToBlob: async (imageUri) => {\n\t\tconst response = await fetch(imageUri);\n\t\treturn response.blob();\n\t},\n\tuploadBlobAWS: (bucket, uri, blob, prefix = \"\", progressCallback = null) => {\n\t\tconst imageName = prefix ? uri.replace(/^.*[\\\\/]/, \"\") : uri;\n\t\tconst fileType = mime.lookup(uri);\n\t\tconst access = {\n\t\t\tlevel: \"public\",\n\t\t\tbucket,\n\t\t\tcontentType: fileType,\n\t\t\tcustomPrefix: { public: \"\" },\n\t\t\tprogressCallback: (progress) =>\n\t\t\t\tprogressCallback &&\n\t\t\t\tprogressCallback({\n\t\t\t\t\turi,\n\t\t\t\t\tloaded: progress.loaded,\n\t\t\t\t\ttotal: progress.total,\n\t\t\t\t\tpercentage: `${Math.floor((progress.loaded / progress.total) * 100)}%`,\n\t\t\t\t}),\n\t\t};\n\t\treturn Storage.put(`${prefix}${imageName}`, blob, access);\n\t},\n\tgetStockPhotos: async () => {\n\t\tconst response = await authedFunction({\n\t\t\tmethod: \"GET\",\n\t\t\turl: \"https://pluss60.pluss60-api.com/media-demo/library\",\n\t\t});\n\t\t// Convert to images object\n\t\tconst images = response.data.map((image) => {\n\t\t\treturn { uri: image };\n\t\t});\n\t\treturn images;\n\t},\n\tgetMediaFolders: (site) => {\n\t\tconst query = { site };\n\t\treturn authedFunction({\n\t\t\tmethod: \"GET\",\n\t\t\turl: getUrl(\"media\", \"folders\", query),\n\t\t});\n\t},\n\t// addMediaFolder: (site, name, images) => {\n\t// return authedFunction({\n\t// method: 'POST',\n\t// url: getUrl('media', 'addFolder'),\n\t// data: {\n\t// site,\n\t// name,\n\t// images,\n\t// },\n\t// });\n\t// },\n\t// addImagesToFolder: (id, site, images) => {\n\t// return authedFunction({\n\t// method: 'POST',\n\t// url: getUrl('media', 'addImages'),\n\t// data: {\n\t// id,\n\t// site,\n\t// images,\n\t// },\n\t// });\n\t// },\n};\n"],"mappings":"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","ignoreList":[]}
|