@plusscommunities/pluss-core-app 4.0.4-auth.0 → 6.0.0-auth.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/actions/FollowerActions.js +34 -0
- package/dist/module/actions/FollowerActions.js.map +1 -0
- package/dist/module/actions/MediaActions.js +29 -0
- package/dist/module/actions/MediaActions.js.map +1 -0
- package/dist/module/actions/ResidentActions.js +26 -0
- package/dist/module/actions/ResidentActions.js.map +1 -0
- package/dist/module/actions/UserActions.js +223 -0
- package/dist/module/actions/UserActions.js.map +1 -0
- package/dist/module/actions/UserSettingsActions.js +14 -0
- package/dist/module/actions/UserSettingsActions.js.map +1 -0
- package/dist/module/actions/index.js +6 -0
- package/dist/module/actions/index.js.map +1 -0
- package/dist/module/actions/types.js +17 -0
- package/dist/module/actions/types.js.map +1 -0
- package/dist/module/apis/analyticsActions.js +20 -0
- package/dist/module/apis/analyticsActions.js.map +1 -0
- package/dist/module/apis/contactActions.js +27 -0
- package/dist/module/apis/contactActions.js.map +1 -0
- package/dist/module/apis/eventActions.js +161 -0
- package/dist/module/apis/eventActions.js.map +1 -0
- package/dist/module/apis/fileActions.js +86 -0
- package/dist/module/apis/fileActions.js.map +1 -0
- package/dist/module/apis/followerActions.js +38 -0
- package/dist/module/apis/followerActions.js.map +1 -0
- package/dist/module/apis/index.js +12 -0
- package/dist/module/apis/index.js.map +1 -0
- package/dist/module/apis/notificationActions.js +60 -0
- package/dist/module/apis/notificationActions.js.map +1 -0
- package/dist/module/apis/profileActions.js +14 -0
- package/dist/module/apis/profileActions.js.map +1 -0
- package/dist/module/apis/reactionActions.js +76 -0
- package/dist/module/apis/reactionActions.js.map +1 -0
- package/dist/module/apis/stringActions.js +30 -0
- package/dist/module/apis/stringActions.js.map +1 -0
- package/dist/module/apis/typeActions.js +15 -0
- package/dist/module/apis/typeActions.js.map +1 -0
- package/dist/module/apis/userActions.js +104 -0
- package/dist/module/apis/userActions.js.map +1 -0
- package/dist/module/assets/icons/reactions/heart.png +0 -0
- package/dist/module/assets/icons/reactions/party.png +0 -0
- package/dist/module/assets/icons/reactions/sad.png +0 -0
- package/dist/module/assets/icons/reactions/smile.png +0 -0
- package/dist/module/colours.js +168 -0
- package/dist/module/colours.js.map +1 -0
- package/dist/module/components/AddButton.js +43 -0
- package/dist/module/components/AddButton.js.map +1 -0
- package/dist/module/components/AddToCalendarButton.js +225 -0
- package/dist/module/components/AddToCalendarButton.js.map +1 -0
- package/dist/module/components/Attachment.js +54 -0
- package/dist/module/components/Attachment.js.map +1 -0
- package/dist/module/components/AudienceSelectorLauncher.js +64 -0
- package/dist/module/components/AudienceSelectorLauncher.js.map +1 -0
- package/dist/module/components/AudienceSelectorPage.js +350 -0
- package/dist/module/components/AudienceSelectorPage.js.map +1 -0
- package/dist/module/components/AutoOffsetImage.js +186 -0
- package/dist/module/components/AutoOffsetImage.js.map +1 -0
- package/dist/module/components/BackButton.js +58 -0
- package/dist/module/components/BackButton.js.map +1 -0
- package/dist/module/components/CategoryTabs.js +154 -0
- package/dist/module/components/CategoryTabs.js.map +1 -0
- package/dist/module/components/CommentReply.js +328 -0
- package/dist/module/components/CommentReply.js.map +1 -0
- package/dist/module/components/CommentSection.js +822 -0
- package/dist/module/components/CommentSection.js.map +1 -0
- package/dist/module/components/ConfirmPopup.js +108 -0
- package/dist/module/components/ConfirmPopup.js.map +1 -0
- package/dist/module/components/ConfirmationPopup.js +72 -0
- package/dist/module/components/ConfirmationPopup.js.map +1 -0
- package/dist/module/components/DropDownItem.js +74 -0
- package/dist/module/components/DropDownItem.js.map +1 -0
- package/dist/module/components/DropDownMenu.js +41 -0
- package/dist/module/components/DropDownMenu.js.map +1 -0
- package/dist/module/components/EmptyStateMain.js +50 -0
- package/dist/module/components/EmptyStateMain.js.map +1 -0
- package/dist/module/components/EmptyStateWidget.js +47 -0
- package/dist/module/components/EmptyStateWidget.js.map +1 -0
- package/dist/module/components/FontScaleButton.js +36 -0
- package/dist/module/components/FontScaleButton.js.map +1 -0
- package/dist/module/components/FontScalePopup.js +75 -0
- package/dist/module/components/FontScalePopup.js.map +1 -0
- package/dist/module/components/FormCard.js +25 -0
- package/dist/module/components/FormCard.js.map +1 -0
- package/dist/module/components/FormCardSection.js +212 -0
- package/dist/module/components/FormCardSection.js.map +1 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js +72 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -0
- package/dist/module/components/FormattedText.js +131 -0
- package/dist/module/components/FormattedText.js.map +1 -0
- package/dist/module/components/GenericInput.js +148 -0
- package/dist/module/components/GenericInput.js.map +1 -0
- package/dist/module/components/GenericInputSection.js +158 -0
- package/dist/module/components/GenericInputSection.js.map +1 -0
- package/dist/module/components/Header.js +458 -0
- package/dist/module/components/Header.js.map +1 -0
- package/dist/module/components/ImagePopup.js +240 -0
- package/dist/module/components/ImagePopup.js.map +1 -0
- package/dist/module/components/ImageUploadProgress.js +68 -0
- package/dist/module/components/ImageUploadProgress.js.map +1 -0
- package/dist/module/components/ImageUploader.js +795 -0
- package/dist/module/components/ImageUploader.js.map +1 -0
- package/dist/module/components/InlineButton.js +65 -0
- package/dist/module/components/InlineButton.js.map +1 -0
- package/dist/module/components/Input.js +154 -0
- package/dist/module/components/Input.js.map +1 -0
- package/dist/module/components/LoadingCircles.js +220 -0
- package/dist/module/components/LoadingCircles.js.map +1 -0
- package/dist/module/components/LoadingIndicator.js +86 -0
- package/dist/module/components/LoadingIndicator.js.map +1 -0
- package/dist/module/components/LoadingStateWidget.js +46 -0
- package/dist/module/components/LoadingStateWidget.js.map +1 -0
- package/dist/module/components/MediaPlayer.js +418 -0
- package/dist/module/components/MediaPlayer.js.map +1 -0
- package/dist/module/components/MiddlePopup.js +43 -0
- package/dist/module/components/MiddlePopup.js.map +1 -0
- package/dist/module/components/PDFPopup.js +191 -0
- package/dist/module/components/PDFPopup.js.map +1 -0
- package/dist/module/components/PlussChat.js +986 -0
- package/dist/module/components/PlussChat.js.map +1 -0
- package/dist/module/components/PlussChatMessage.js +262 -0
- package/dist/module/components/PlussChatMessage.js.map +1 -0
- package/dist/module/components/PlussChatTime.js +58 -0
- package/dist/module/components/PlussChatTime.js.map +1 -0
- package/dist/module/components/Popup.js +125 -0
- package/dist/module/components/Popup.js.map +1 -0
- package/dist/module/components/PopupMenu.js +119 -0
- package/dist/module/components/PopupMenu.js.map +1 -0
- package/dist/module/components/PositionedImage.js +313 -0
- package/dist/module/components/PositionedImage.js.map +1 -0
- package/dist/module/components/ProfilePic.js +106 -0
- package/dist/module/components/ProfilePic.js.map +1 -0
- package/dist/module/components/RadioButton.js +77 -0
- package/dist/module/components/RadioButton.js.map +1 -0
- package/dist/module/components/Reaction.js +116 -0
- package/dist/module/components/Reaction.js.map +1 -0
- package/dist/module/components/Reactions.js +71 -0
- package/dist/module/components/Reactions.js.map +1 -0
- package/dist/module/components/SharingTools.js +154 -0
- package/dist/module/components/SharingTools.js.map +1 -0
- package/dist/module/components/Spinner.js +22 -0
- package/dist/module/components/Spinner.js.map +1 -0
- package/dist/module/components/StickyFooter.js +34 -0
- package/dist/module/components/StickyFooter.js.map +1 -0
- package/dist/module/components/TextStyle.js +45 -0
- package/dist/module/components/TextStyle.js.map +1 -0
- package/dist/module/components/Toggle.js +65 -0
- package/dist/module/components/Toggle.js.map +1 -0
- package/dist/module/components/TouchableSearchBar.js +67 -0
- package/dist/module/components/TouchableSearchBar.js.map +1 -0
- package/dist/module/components/UserListPopup.js +135 -0
- package/dist/module/components/UserListPopup.js.map +1 -0
- package/dist/module/components/UserListing.js +267 -0
- package/dist/module/components/UserListing.js.map +1 -0
- package/dist/module/components/VideoPopup.js +113 -0
- package/dist/module/components/VideoPopup.js.map +1 -0
- package/dist/module/components/WarningPopup.js +82 -0
- package/dist/module/components/WarningPopup.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +289 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +116 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -0
- package/dist/module/components/index.js +55 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +385 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +387 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -0
- package/dist/module/config.js +32 -0
- package/dist/module/config.js.map +1 -0
- package/dist/module/constants.js +19 -0
- package/dist/module/constants.js.map +1 -0
- package/dist/module/fonts/index.js +2 -0
- package/dist/module/fonts/index.js.map +1 -0
- package/dist/module/fonts/pluss60-icons.js +5 -0
- package/dist/module/fonts/pluss60-icons.js.map +1 -0
- package/dist/module/fonts/pluss60-icons.json +1097 -0
- package/dist/module/helper.js +397 -0
- package/dist/module/helper.js.map +1 -0
- package/dist/module/index.js +13 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/js/images/detectFaces.js +30 -0
- package/dist/module/js/images/detectFaces.js.map +1 -0
- package/dist/module/js/images/findLandmarkRange.js +93 -0
- package/dist/module/js/images/findLandmarkRange.js.map +1 -0
- package/dist/module/js/images/getScaledOffset.js +81 -0
- package/dist/module/js/images/getScaledOffset.js.map +1 -0
- package/dist/module/js/site/getSiteLevelFromState.js +29 -0
- package/dist/module/js/site/getSiteLevelFromState.js.map +1 -0
- package/dist/module/js/site/isTVEnabled.js +10 -0
- package/dist/module/js/site/isTVEnabled.js.map +1 -0
- package/dist/module/session.js +58 -0
- package/dist/module/session.js.map +1 -0
- package/dist/module/styles.js +67 -0
- package/dist/module/styles.js.map +1 -0
- package/package.json +20 -24
- package/src/js/images/detectFaces.js +8 -4
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const getScaledOffset = (sourceWidth, sourceHeight, targetWidth, targetHeight) => {
|
|
2
|
+
const sourceRatio = sourceWidth / sourceHeight;
|
|
3
|
+
const targetRatio = targetWidth / targetHeight;
|
|
4
|
+
|
|
5
|
+
// same ratio. no adjustment needed.
|
|
6
|
+
if (sourceRatio === targetRatio) {
|
|
7
|
+
return {
|
|
8
|
+
width: targetWidth,
|
|
9
|
+
height: targetHeight,
|
|
10
|
+
scaleFactor: targetWidth / sourceWidth,
|
|
11
|
+
offset: {
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0
|
|
14
|
+
},
|
|
15
|
+
bounds: {
|
|
16
|
+
start: {
|
|
17
|
+
x: 0,
|
|
18
|
+
y: 0
|
|
19
|
+
},
|
|
20
|
+
end: {
|
|
21
|
+
x: targetWidth,
|
|
22
|
+
y: targetHeight
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// source is higher than target. height scaling and y offset required.
|
|
29
|
+
if (sourceRatio < targetRatio) {
|
|
30
|
+
const scaleFactor = targetWidth / sourceWidth;
|
|
31
|
+
const adjustedHeight = sourceHeight * scaleFactor;
|
|
32
|
+
const yOffset = (adjustedHeight - targetHeight) / 2;
|
|
33
|
+
return {
|
|
34
|
+
width: targetWidth,
|
|
35
|
+
height: adjustedHeight,
|
|
36
|
+
scaleFactor,
|
|
37
|
+
offset: {
|
|
38
|
+
x: 0,
|
|
39
|
+
y: -yOffset
|
|
40
|
+
},
|
|
41
|
+
bounds: {
|
|
42
|
+
start: {
|
|
43
|
+
x: 0,
|
|
44
|
+
y: yOffset
|
|
45
|
+
},
|
|
46
|
+
end: {
|
|
47
|
+
x: targetWidth,
|
|
48
|
+
y: yOffset + adjustedHeight
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// source is wider than target. width scaling and x offset required.
|
|
55
|
+
if (sourceRatio > targetRatio) {
|
|
56
|
+
const scaleFactor = targetHeight / sourceHeight;
|
|
57
|
+
const adjustedWidth = sourceWidth * scaleFactor;
|
|
58
|
+
const xOffset = (adjustedWidth - targetWidth) / 2;
|
|
59
|
+
return {
|
|
60
|
+
width: adjustedWidth,
|
|
61
|
+
height: targetHeight,
|
|
62
|
+
scaleFactor,
|
|
63
|
+
offset: {
|
|
64
|
+
x: -xOffset,
|
|
65
|
+
y: 0
|
|
66
|
+
},
|
|
67
|
+
bounds: {
|
|
68
|
+
start: {
|
|
69
|
+
x: xOffset,
|
|
70
|
+
y: 0
|
|
71
|
+
},
|
|
72
|
+
end: {
|
|
73
|
+
x: xOffset + adjustedWidth,
|
|
74
|
+
y: targetHeight
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export default getScaledOffset;
|
|
81
|
+
//# sourceMappingURL=getScaledOffset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getScaledOffset","sourceWidth","sourceHeight","targetWidth","targetHeight","sourceRatio","targetRatio","width","height","scaleFactor","offset","x","y","bounds","start","end","adjustedHeight","yOffset","adjustedWidth","xOffset"],"sources":["getScaledOffset.js"],"sourcesContent":["const getScaledOffset = (sourceWidth, sourceHeight, targetWidth, targetHeight) => {\n const sourceRatio = sourceWidth / sourceHeight;\n const targetRatio = targetWidth / targetHeight;\n\n // same ratio. no adjustment needed.\n if (sourceRatio === targetRatio) {\n return {\n width: targetWidth,\n height: targetHeight,\n scaleFactor: targetWidth / sourceWidth,\n offset: {\n x: 0,\n y: 0,\n },\n bounds: {\n start: {\n x: 0,\n y: 0,\n },\n end: {\n x: targetWidth,\n y: targetHeight,\n },\n },\n };\n }\n\n // source is higher than target. height scaling and y offset required.\n if (sourceRatio < targetRatio) {\n const scaleFactor = targetWidth / sourceWidth;\n const adjustedHeight = sourceHeight * scaleFactor;\n const yOffset = (adjustedHeight - targetHeight) / 2;\n\n return {\n width: targetWidth,\n height: adjustedHeight,\n scaleFactor,\n offset: {\n x: 0,\n y: -yOffset,\n },\n bounds: {\n start: {\n x: 0,\n y: yOffset,\n },\n end: {\n x: targetWidth,\n y: yOffset + adjustedHeight,\n },\n },\n };\n }\n\n // source is wider than target. width scaling and x offset required.\n if (sourceRatio > targetRatio) {\n const scaleFactor = targetHeight / sourceHeight;\n const adjustedWidth = sourceWidth * scaleFactor;\n const xOffset = (adjustedWidth - targetWidth) / 2;\n\n return {\n width: adjustedWidth,\n height: targetHeight,\n scaleFactor,\n offset: {\n x: -xOffset,\n y: 0,\n },\n bounds: {\n start: {\n x: xOffset,\n y: 0,\n },\n end: {\n x: xOffset + adjustedWidth,\n y: targetHeight,\n },\n },\n };\n }\n};\n\nexport default getScaledOffset;\n"],"mappings":"AAAA,MAAMA,eAAe,GAAGA,CAACC,WAAW,EAAEC,YAAY,EAAEC,WAAW,EAAEC,YAAY,KAAK;EAChF,MAAMC,WAAW,GAAGJ,WAAW,GAAGC,YAAY;EAC9C,MAAMI,WAAW,GAAGH,WAAW,GAAGC,YAAY;;EAE9C;EACA,IAAIC,WAAW,KAAKC,WAAW,EAAE;IAC/B,OAAO;MACLC,KAAK,EAAEJ,WAAW;MAClBK,MAAM,EAAEJ,YAAY;MACpBK,WAAW,EAAEN,WAAW,GAAGF,WAAW;MACtCS,MAAM,EAAE;QACNC,CAAC,EAAE,CAAC;QACJC,CAAC,EAAE;MACL,CAAC;MACDC,MAAM,EAAE;QACNC,KAAK,EAAE;UACLH,CAAC,EAAE,CAAC;UACJC,CAAC,EAAE;QACL,CAAC;QACDG,GAAG,EAAE;UACHJ,CAAC,EAAER,WAAW;UACdS,CAAC,EAAER;QACL;MACF;IACF,CAAC;EACH;;EAEA;EACA,IAAIC,WAAW,GAAGC,WAAW,EAAE;IAC7B,MAAMG,WAAW,GAAGN,WAAW,GAAGF,WAAW;IAC7C,MAAMe,cAAc,GAAGd,YAAY,GAAGO,WAAW;IACjD,MAAMQ,OAAO,GAAG,CAACD,cAAc,GAAGZ,YAAY,IAAI,CAAC;IAEnD,OAAO;MACLG,KAAK,EAAEJ,WAAW;MAClBK,MAAM,EAAEQ,cAAc;MACtBP,WAAW;MACXC,MAAM,EAAE;QACNC,CAAC,EAAE,CAAC;QACJC,CAAC,EAAE,CAACK;MACN,CAAC;MACDJ,MAAM,EAAE;QACNC,KAAK,EAAE;UACLH,CAAC,EAAE,CAAC;UACJC,CAAC,EAAEK;QACL,CAAC;QACDF,GAAG,EAAE;UACHJ,CAAC,EAAER,WAAW;UACdS,CAAC,EAAEK,OAAO,GAAGD;QACf;MACF;IACF,CAAC;EACH;;EAEA;EACA,IAAIX,WAAW,GAAGC,WAAW,EAAE;IAC7B,MAAMG,WAAW,GAAGL,YAAY,GAAGF,YAAY;IAC/C,MAAMgB,aAAa,GAAGjB,WAAW,GAAGQ,WAAW;IAC/C,MAAMU,OAAO,GAAG,CAACD,aAAa,GAAGf,WAAW,IAAI,CAAC;IAEjD,OAAO;MACLI,KAAK,EAAEW,aAAa;MACpBV,MAAM,EAAEJ,YAAY;MACpBK,WAAW;MACXC,MAAM,EAAE;QACNC,CAAC,EAAE,CAACQ,OAAO;QACXP,CAAC,EAAE;MACL,CAAC;MACDC,MAAM,EAAE;QACNC,KAAK,EAAE;UACLH,CAAC,EAAEQ,OAAO;UACVP,CAAC,EAAE;QACL,CAAC;QACDG,GAAG,EAAE;UACHJ,CAAC,EAAEQ,OAAO,GAAGD,aAAa;UAC1BN,CAAC,EAAER;QACL;MACF;IACF,CAAC;EACH;AACF,CAAC;AAED,eAAeJ,eAAe"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const getSiteLevelFromState = state => {
|
|
2
|
+
let siteType = 'legacy';
|
|
3
|
+
if (state && state.user && state.user.siteInfo && state.user.siteInfo.Type) {
|
|
4
|
+
siteType = state.user.siteInfo.Type;
|
|
5
|
+
}
|
|
6
|
+
const siteConfig = {
|
|
7
|
+
type: siteType,
|
|
8
|
+
hasTV: true,
|
|
9
|
+
hasKiosk: false,
|
|
10
|
+
hasPayments: true,
|
|
11
|
+
hasPersonalNotes: true,
|
|
12
|
+
hasEmergencyContacts: true,
|
|
13
|
+
hasPersonalDocuments: true
|
|
14
|
+
};
|
|
15
|
+
switch (siteType) {
|
|
16
|
+
case 'free':
|
|
17
|
+
siteConfig.hasTV = false;
|
|
18
|
+
siteConfig.hasPayments = false;
|
|
19
|
+
siteConfig.hasPersonalNotes = false;
|
|
20
|
+
siteConfig.hasEmergencyContacts = false;
|
|
21
|
+
siteConfig.hasPersonalDocuments = false;
|
|
22
|
+
break;
|
|
23
|
+
default:
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
return siteConfig;
|
|
27
|
+
};
|
|
28
|
+
export default getSiteLevelFromState;
|
|
29
|
+
//# sourceMappingURL=getSiteLevelFromState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getSiteLevelFromState","state","siteType","user","siteInfo","Type","siteConfig","type","hasTV","hasKiosk","hasPayments","hasPersonalNotes","hasEmergencyContacts","hasPersonalDocuments"],"sources":["getSiteLevelFromState.js"],"sourcesContent":["const getSiteLevelFromState = state => {\n let siteType = 'legacy';\n if (state && state.user && state.user.siteInfo && state.user.siteInfo.Type) {\n siteType = state.user.siteInfo.Type;\n }\n const siteConfig = {\n type: siteType,\n hasTV: true,\n hasKiosk: false,\n hasPayments: true,\n hasPersonalNotes: true,\n hasEmergencyContacts: true,\n hasPersonalDocuments: true,\n };\n\n switch (siteType) {\n case 'free':\n siteConfig.hasTV = false;\n siteConfig.hasPayments = false;\n siteConfig.hasPersonalNotes = false;\n siteConfig.hasEmergencyContacts = false;\n siteConfig.hasPersonalDocuments = false;\n break;\n default:\n break;\n }\n return siteConfig;\n};\n\nexport default getSiteLevelFromState;\n"],"mappings":"AAAA,MAAMA,qBAAqB,GAAGC,KAAK,IAAI;EACrC,IAAIC,QAAQ,GAAG,QAAQ;EACvB,IAAID,KAAK,IAAIA,KAAK,CAACE,IAAI,IAAIF,KAAK,CAACE,IAAI,CAACC,QAAQ,IAAIH,KAAK,CAACE,IAAI,CAACC,QAAQ,CAACC,IAAI,EAAE;IAC1EH,QAAQ,GAAGD,KAAK,CAACE,IAAI,CAACC,QAAQ,CAACC,IAAI;EACrC;EACA,MAAMC,UAAU,GAAG;IACjBC,IAAI,EAAEL,QAAQ;IACdM,KAAK,EAAE,IAAI;IACXC,QAAQ,EAAE,KAAK;IACfC,WAAW,EAAE,IAAI;IACjBC,gBAAgB,EAAE,IAAI;IACtBC,oBAAoB,EAAE,IAAI;IAC1BC,oBAAoB,EAAE;EACxB,CAAC;EAED,QAAQX,QAAQ;IACd,KAAK,MAAM;MACTI,UAAU,CAACE,KAAK,GAAG,KAAK;MACxBF,UAAU,CAACI,WAAW,GAAG,KAAK;MAC9BJ,UAAU,CAACK,gBAAgB,GAAG,KAAK;MACnCL,UAAU,CAACM,oBAAoB,GAAG,KAAK;MACvCN,UAAU,CAACO,oBAAoB,GAAG,KAAK;MACvC;IACF;MACE;EACJ;EACA,OAAOP,UAAU;AACnB,CAAC;AAED,eAAeN,qBAAqB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
const isTVEnabled = (interfaces, feature) => {
|
|
3
|
+
return _.some(interfaces, t => {
|
|
4
|
+
return t.Type === 'TV' && (!feature || _.some(t.Settings.widgets, f => {
|
|
5
|
+
return f.key === feature;
|
|
6
|
+
}));
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
export default isTVEnabled;
|
|
10
|
+
//# sourceMappingURL=isTVEnabled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_","isTVEnabled","interfaces","feature","some","t","Type","Settings","widgets","f","key"],"sources":["isTVEnabled.js"],"sourcesContent":["import _ from 'lodash';\n\nconst isTVEnabled = (interfaces, feature) => {\n return _.some(interfaces, t => {\n return (\n t.Type === 'TV' &&\n (!feature ||\n _.some(t.Settings.widgets, f => {\n return f.key === feature;\n }))\n );\n });\n};\n\nexport default isTVEnabled;\n"],"mappings":"AAAA,OAAOA,CAAC,MAAM,QAAQ;AAEtB,MAAMC,WAAW,GAAGA,CAACC,UAAU,EAAEC,OAAO,KAAK;EAC3C,OAAOH,CAAC,CAACI,IAAI,CAACF,UAAU,EAAEG,CAAC,IAAI;IAC7B,OACEA,CAAC,CAACC,IAAI,KAAK,IAAI,KACd,CAACH,OAAO,IACPH,CAAC,CAACI,IAAI,CAACC,CAAC,CAACE,QAAQ,CAACC,OAAO,EAAEC,CAAC,IAAI;MAC9B,OAAOA,CAAC,CAACC,GAAG,KAAKP,OAAO;IAC1B,CAAC,CAAC,CAAC;EAET,CAAC,CAAC;AACJ,CAAC;AAED,eAAeF,WAAW"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { Auth } from 'aws-amplify';
|
|
4
|
+
import Config from './config';
|
|
5
|
+
export const getSessionTokenAWS = async prefix => {
|
|
6
|
+
const token = await Config.env.AuthStrategy.getAccessToken();
|
|
7
|
+
if (_.isUndefined(prefix)) return token;
|
|
8
|
+
return `${prefix} ${token}`;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// export const getRefreshTokenAWS = async () => {
|
|
12
|
+
// const data = await Auth.currentSession();
|
|
13
|
+
// return data.getRefreshToken().token;
|
|
14
|
+
// };
|
|
15
|
+
|
|
16
|
+
export const getSessionUidAWS = () => {
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
Auth.currentSession().then(data => {
|
|
19
|
+
resolve(data.accessToken.payload.username);
|
|
20
|
+
}).catch(err => {
|
|
21
|
+
console.log('getSessionUidAWS error', err);
|
|
22
|
+
reject(err);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export const authedFunction = async request => {
|
|
27
|
+
const authkey = await getSessionTokenAWS();
|
|
28
|
+
if (!request.headers) request.headers = {};
|
|
29
|
+
request.headers.authkey = authkey;
|
|
30
|
+
return axios(request);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// export const LogoutAWS = () => {
|
|
34
|
+
// return new Promise((resolve, reject) => {
|
|
35
|
+
// Auth.signOut()
|
|
36
|
+
// .then(() => {
|
|
37
|
+
// resolve();
|
|
38
|
+
// })
|
|
39
|
+
// .catch(err => {
|
|
40
|
+
// reject(err);
|
|
41
|
+
// });
|
|
42
|
+
// });
|
|
43
|
+
// };
|
|
44
|
+
|
|
45
|
+
// export const isTheBest = auth => {
|
|
46
|
+
// return auth && auth.site === 'plussSpace' && auth.type === 'master';
|
|
47
|
+
// };
|
|
48
|
+
|
|
49
|
+
export const getApiError = error => {
|
|
50
|
+
if (!__DEV__) return error;
|
|
51
|
+
try {
|
|
52
|
+
const errorData = error.response.data;
|
|
53
|
+
return errorData || error;
|
|
54
|
+
} catch (e) {
|
|
55
|
+
return error;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_","axios","Auth","Config","getSessionTokenAWS","prefix","token","env","AuthStrategy","getAccessToken","isUndefined","getSessionUidAWS","Promise","resolve","reject","currentSession","then","data","accessToken","payload","username","catch","err","console","log","authedFunction","request","authkey","headers","getApiError","error","__DEV__","errorData","response","e"],"sources":["session.js"],"sourcesContent":["import _ from 'lodash';\nimport axios from 'axios';\nimport { Auth } from 'aws-amplify';\nimport Config from './config';\n\nexport const getSessionTokenAWS = async prefix => {\n const token = await Config.env.AuthStrategy.getAccessToken();\n if (_.isUndefined(prefix)) return token;\n return `${prefix} ${token}`;\n};\n\n// export const getRefreshTokenAWS = async () => {\n// const data = await Auth.currentSession();\n// return data.getRefreshToken().token;\n// };\n\nexport const getSessionUidAWS = () => {\n return new Promise((resolve, reject) => {\n Auth.currentSession()\n .then(data => {\n resolve(data.accessToken.payload.username);\n })\n .catch(err => {\n console.log('getSessionUidAWS error', err);\n reject(err);\n });\n });\n};\n\nexport const authedFunction = async request => {\n const authkey = await getSessionTokenAWS();\n if (!request.headers) request.headers = {};\n request.headers.authkey = authkey;\n\n return axios(request);\n};\n\n// export const LogoutAWS = () => {\n// return new Promise((resolve, reject) => {\n// Auth.signOut()\n// .then(() => {\n// resolve();\n// })\n// .catch(err => {\n// reject(err);\n// });\n// });\n// };\n\n// export const isTheBest = auth => {\n// return auth && auth.site === 'plussSpace' && auth.type === 'master';\n// };\n\nexport const getApiError = error => {\n if (!__DEV__) return error;\n try {\n const errorData = error.response.data;\n return errorData || error;\n } catch (e) {\n return error;\n }\n};\n"],"mappings":"AAAA,OAAOA,CAAC,MAAM,QAAQ;AACtB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,aAAa;AAClC,OAAOC,MAAM,MAAM,UAAU;AAE7B,OAAO,MAAMC,kBAAkB,GAAG,MAAMC,MAAM,IAAI;EAChD,MAAMC,KAAK,GAAG,MAAMH,MAAM,CAACI,GAAG,CAACC,YAAY,CAACC,cAAc,CAAC,CAAC;EAC5D,IAAIT,CAAC,CAACU,WAAW,CAACL,MAAM,CAAC,EAAE,OAAOC,KAAK;EACvC,OAAQ,GAAED,MAAO,IAAGC,KAAM,EAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;;AAEA,OAAO,MAAMK,gBAAgB,GAAGA,CAAA,KAAM;EACpC,OAAO,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtCZ,IAAI,CAACa,cAAc,CAAC,CAAC,CAClBC,IAAI,CAACC,IAAI,IAAI;MACZJ,OAAO,CAACI,IAAI,CAACC,WAAW,CAACC,OAAO,CAACC,QAAQ,CAAC;IAC5C,CAAC,CAAC,CACDC,KAAK,CAACC,GAAG,IAAI;MACZC,OAAO,CAACC,GAAG,CAAC,wBAAwB,EAAEF,GAAG,CAAC;MAC1CR,MAAM,CAACQ,GAAG,CAAC;IACb,CAAC,CAAC;EACN,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAMG,cAAc,GAAG,MAAMC,OAAO,IAAI;EAC7C,MAAMC,OAAO,GAAG,MAAMvB,kBAAkB,CAAC,CAAC;EAC1C,IAAI,CAACsB,OAAO,CAACE,OAAO,EAAEF,OAAO,CAACE,OAAO,GAAG,CAAC,CAAC;EAC1CF,OAAO,CAACE,OAAO,CAACD,OAAO,GAAGA,OAAO;EAEjC,OAAO1B,KAAK,CAACyB,OAAO,CAAC;AACvB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,OAAO,MAAMG,WAAW,GAAGC,KAAK,IAAI;EAClC,IAAI,CAACC,OAAO,EAAE,OAAOD,KAAK;EAC1B,IAAI;IACF,MAAME,SAAS,GAAGF,KAAK,CAACG,QAAQ,CAAChB,IAAI;IACrC,OAAOe,SAAS,IAAIF,KAAK;EAC3B,CAAC,CAAC,OAAOI,CAAC,EAAE;IACV,OAAOJ,KAAK;EACd;AACF,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { COLOUR_GREEN } from './colours';
|
|
3
|
+
export default StyleSheet.create({
|
|
4
|
+
notificationBell: {
|
|
5
|
+
height: 70,
|
|
6
|
+
width: 55,
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
flexDirection: 'row',
|
|
9
|
+
justifyContent: 'space-between'
|
|
10
|
+
},
|
|
11
|
+
fill: {
|
|
12
|
+
flex: 1
|
|
13
|
+
},
|
|
14
|
+
genericPageContainer: {
|
|
15
|
+
flex: 1,
|
|
16
|
+
backgroundColor: '#fff'
|
|
17
|
+
},
|
|
18
|
+
addButton: {
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
bottom: 16,
|
|
21
|
+
right: 16,
|
|
22
|
+
height: 48,
|
|
23
|
+
width: 48,
|
|
24
|
+
borderRadius: 23,
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
zIndex: 200,
|
|
27
|
+
elevation: 2,
|
|
28
|
+
shadowColor: '#000',
|
|
29
|
+
shadowOffset: {
|
|
30
|
+
width: 0,
|
|
31
|
+
height: 2
|
|
32
|
+
},
|
|
33
|
+
shadowOpacity: 0.15,
|
|
34
|
+
shadowRadius: 6
|
|
35
|
+
},
|
|
36
|
+
addButtonIcon: {
|
|
37
|
+
color: '#fff',
|
|
38
|
+
fontSize: 16,
|
|
39
|
+
alignSelf: 'center'
|
|
40
|
+
},
|
|
41
|
+
backButton: {
|
|
42
|
+
height: 32,
|
|
43
|
+
width: 32,
|
|
44
|
+
borderRadius: 15,
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
alignItems: 'center'
|
|
47
|
+
},
|
|
48
|
+
backButtonIcon: {
|
|
49
|
+
color: '#fff',
|
|
50
|
+
fontSize: 18
|
|
51
|
+
},
|
|
52
|
+
tickBox: {
|
|
53
|
+
height: 20,
|
|
54
|
+
width: 20,
|
|
55
|
+
backgroundColor: COLOUR_GREEN,
|
|
56
|
+
borderRadius: 10,
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
alignItems: 'center'
|
|
59
|
+
},
|
|
60
|
+
tickIcon: {
|
|
61
|
+
color: '#fff',
|
|
62
|
+
fontSize: 17,
|
|
63
|
+
paddingTop: 1,
|
|
64
|
+
paddingLeft: 1
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","COLOUR_GREEN","create","notificationBell","height","width","alignItems","flexDirection","justifyContent","fill","flex","genericPageContainer","backgroundColor","addButton","position","bottom","right","borderRadius","zIndex","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","addButtonIcon","color","fontSize","alignSelf","backButton","backButtonIcon","tickBox","tickIcon","paddingTop","paddingLeft"],"sources":["styles.js"],"sourcesContent":["import { StyleSheet } from 'react-native';\nimport { COLOUR_GREEN } from './colours';\n\nexport default StyleSheet.create({\n notificationBell: {\n height: 70,\n width: 55,\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n fill: {\n flex: 1,\n },\n genericPageContainer: {\n flex: 1,\n backgroundColor: '#fff',\n },\n addButton: {\n position: 'absolute',\n bottom: 16,\n right: 16,\n height: 48,\n width: 48,\n borderRadius: 23,\n justifyContent: 'center',\n zIndex: 200,\n elevation: 2,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.15,\n shadowRadius: 6,\n },\n addButtonIcon: {\n color: '#fff',\n fontSize: 16,\n alignSelf: 'center',\n },\n backButton: {\n height: 32,\n width: 32,\n borderRadius: 15,\n justifyContent: 'center',\n alignItems: 'center',\n },\n backButtonIcon: {\n color: '#fff',\n fontSize: 18,\n },\n tickBox: {\n height: 20,\n width: 20,\n backgroundColor: COLOUR_GREEN,\n borderRadius: 10,\n justifyContent: 'center',\n alignItems: 'center',\n },\n tickIcon: {\n color: '#fff',\n fontSize: 17,\n paddingTop: 1,\n paddingLeft: 1,\n },\n});\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,YAAY,QAAQ,WAAW;AAExC,eAAeD,UAAU,CAACE,MAAM,CAAC;EAC/BC,gBAAgB,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDC,IAAI,EAAE;IACJC,IAAI,EAAE;EACR,CAAC;EACDC,oBAAoB,EAAE;IACpBD,IAAI,EAAE,CAAC;IACPE,eAAe,EAAE;EACnB,CAAC;EACDC,SAAS,EAAE;IACTC,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTZ,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTY,YAAY,EAAE,EAAE;IAChBT,cAAc,EAAE,QAAQ;IACxBU,MAAM,EAAE,GAAG;IACXC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEhB,KAAK,EAAE,CAAC;MAAED,MAAM,EAAE;IAAE,CAAC;IACrCkB,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;EAChB,CAAC;EACDC,aAAa,EAAE;IACbC,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE;EACb,CAAC;EACDC,UAAU,EAAE;IACVxB,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTY,YAAY,EAAE,EAAE;IAChBT,cAAc,EAAE,QAAQ;IACxBF,UAAU,EAAE;EACd,CAAC;EACDuB,cAAc,EAAE;IACdJ,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAE;EACZ,CAAC;EACDI,OAAO,EAAE;IACP1B,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTO,eAAe,EAAEX,YAAY;IAC7BgB,YAAY,EAAE,EAAE;IAChBT,cAAc,EAAE,QAAQ;IACxBF,UAAU,EAAE;EACd,CAAC;EACDyB,QAAQ,EAAE;IACRN,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAE,EAAE;IACZM,UAAU,EAAE,CAAC;IACbC,WAAW,EAAE;EACf;AACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plusscommunities/pluss-core-app",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-auth.0",
|
|
4
4
|
"description": "Core extension package for Pluss Communities platform",
|
|
5
5
|
"main": "dist/module/index.js",
|
|
6
6
|
"module": "dist/module/index.js",
|
|
@@ -23,45 +23,41 @@
|
|
|
23
23
|
},
|
|
24
24
|
"author": "Phillip Suh",
|
|
25
25
|
"license": "ISC",
|
|
26
|
-
"dependencies": {
|
|
27
|
-
|
|
28
|
-
"@
|
|
29
|
-
"@react-native-
|
|
30
|
-
"@react-native-picker/picker": "2.4.8",
|
|
26
|
+
"dependencies": {},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@expo/vector-icons": "^14.0.0",
|
|
29
|
+
"@react-native-async-storage/async-storage": "1.21.0",
|
|
31
30
|
"aws-amplify": "^4.3.11",
|
|
32
31
|
"aws-amplify-react-native": "^6.0.2",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"expo-
|
|
36
|
-
"expo-
|
|
37
|
-
"expo-
|
|
38
|
-
"expo-
|
|
39
|
-
"expo-image-
|
|
40
|
-
"expo-
|
|
41
|
-
"expo-
|
|
42
|
-
"expo-
|
|
43
|
-
"expo-
|
|
32
|
+
"axios": "^1.6.8",
|
|
33
|
+
"deprecated-react-native-prop-types": "^4.1.0",
|
|
34
|
+
"expo-av": "~13.10.6",
|
|
35
|
+
"expo-calendar": "~12.2.1",
|
|
36
|
+
"expo-constants": "~15.4.6",
|
|
37
|
+
"expo-file-system": "~16.0.9",
|
|
38
|
+
"expo-image-manipulator": "~11.8.0",
|
|
39
|
+
"expo-image-picker": "~14.7.1",
|
|
40
|
+
"expo-linear-gradient": "~12.7.2",
|
|
41
|
+
"expo-media-library": "~15.9.2",
|
|
42
|
+
"expo-screen-orientation": "~6.4.1",
|
|
43
|
+
"expo-sharing": "~11.10.0",
|
|
44
44
|
"expo-video-player": "^1.6.0",
|
|
45
45
|
"js-cookie": "^2.2.1",
|
|
46
46
|
"lodash": "^4.17.4",
|
|
47
47
|
"mime-types": "^2.1.24",
|
|
48
48
|
"moment": "^2.18.1",
|
|
49
49
|
"react": "18.2.0",
|
|
50
|
-
"react-native": "0.
|
|
50
|
+
"react-native": "0.73.6",
|
|
51
51
|
"react-native-auto-height-image": "3.1.3",
|
|
52
52
|
"react-native-elements": "^0.17.0",
|
|
53
|
+
"react-native-gifted-chat": "^0.16.3",
|
|
53
54
|
"react-native-image-zoom-viewer": "^3.0.1",
|
|
54
55
|
"react-native-iphone-x-helper": "^1.3.1",
|
|
55
56
|
"react-native-vimeo-iframe": "^1.0.4",
|
|
56
|
-
"react-native-webview": "
|
|
57
|
+
"react-native-webview": "13.6.4",
|
|
57
58
|
"react-native-youtube-iframe": "^2.2.1",
|
|
58
59
|
"react-redux": "^7.2.6"
|
|
59
60
|
},
|
|
60
|
-
"peerDependencies": {
|
|
61
|
-
"react-native-gifted-chat": "^0.16.3",
|
|
62
|
-
"axios": "^1.6.8",
|
|
63
|
-
"deprecated-react-native-prop-types": "^4.1.0"
|
|
64
|
-
},
|
|
65
61
|
"devDependencies": {
|
|
66
62
|
"react-native-builder-bob": "^0.18.2"
|
|
67
63
|
},
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { stringActions } from '../../apis';
|
|
2
2
|
import moment from 'moment';
|
|
3
3
|
import * as FileSystem from 'expo-file-system';
|
|
4
|
-
import * as FaceDetector from 'expo-face-detector';
|
|
4
|
+
// import * as FaceDetector from 'expo-face-detector';
|
|
5
5
|
|
|
6
6
|
const detectFaces = async remoteUrl => {
|
|
7
|
+
// deprecated
|
|
8
|
+
|
|
7
9
|
const parts = remoteUrl.split('/').splice(-2);
|
|
8
10
|
const mediaId = parts[0];
|
|
9
11
|
const extension = parts[1].split('.').splice(-1)[0];
|
|
@@ -12,9 +14,11 @@ const detectFaces = async remoteUrl => {
|
|
|
12
14
|
|
|
13
15
|
const { uri: localUrl } = await FileSystem.downloadAsync(remoteUrl, downloadPath);
|
|
14
16
|
|
|
15
|
-
const faces = await FaceDetector.detectFacesAsync(localUrl, {
|
|
16
|
-
|
|
17
|
-
});
|
|
17
|
+
// const faces = await FaceDetector.detectFacesAsync(localUrl, {
|
|
18
|
+
// mode: FaceDetector.FaceDetectorMode.accurate,
|
|
19
|
+
// });
|
|
20
|
+
|
|
21
|
+
const faces = null;
|
|
18
22
|
|
|
19
23
|
if (faces && faces.image && faces.image.uri) {
|
|
20
24
|
delete faces.image.uri;
|