From 7adb4415add4b2a58b621aaa14b87ad070c39b8e Mon Sep 17 00:00:00 2001 From: brianreicher Date: Fri, 31 Mar 2023 15:16:18 -0400 Subject: [PATCH 1/9] Initial build reminder screen --- remo-client/App.tsx | 5 +- remo-client/screens/googleSSO.tsx | 2 +- remo-client/screens/notifications.tsx | 96 +++++++++++++++++++++++++++ remo-client/screens/profile.tsx | 7 +- remo-client/screens/register.tsx | 2 +- remo-client/services/api_links.tsx | 2 +- 6 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 remo-client/screens/notifications.tsx diff --git a/remo-client/App.tsx b/remo-client/App.tsx index 24881f2..57322b0 100644 --- a/remo-client/App.tsx +++ b/remo-client/App.tsx @@ -17,6 +17,8 @@ import Register from "./screens/register"; import BookInfo from "./screens/bookinfo"; import Returns from "./screens/returnShelf"; import BookReturn from "./screens/bookReturn"; +import Notifications from "./screens/notifications"; + const Stack = createNativeStackNavigator(); @@ -40,7 +42,8 @@ export default function App() { - + + ); diff --git a/remo-client/screens/googleSSO.tsx b/remo-client/screens/googleSSO.tsx index 8af3e98..7f53ef5 100644 --- a/remo-client/screens/googleSSO.tsx +++ b/remo-client/screens/googleSSO.tsx @@ -64,7 +64,7 @@ export default function GoogleSSO() { try { var res = await fetch( - "https://f9a8-155-33-133-12.ngrok.io/v1/login", { + "https://320b-155-33-133-12.ngrok.io/v1/login", { method: "POST", credentials: "include", headers: { diff --git a/remo-client/screens/notifications.tsx b/remo-client/screens/notifications.tsx new file mode 100644 index 0000000..c0e20cd --- /dev/null +++ b/remo-client/screens/notifications.tsx @@ -0,0 +1,96 @@ +import React, { useState } from 'react'; +import { View, TextInput, StyleSheet, Text, Switch} from 'react-native'; +import { useNavigation } from "@react-navigation/native"; + + +import { + useRoute + } from "@react-navigation/native"; + + +const Notifications = () => { + const route = useRoute(); + const data = route.params?.data; + const navigation = useNavigation(); + const [isEnabled, setIsEnabled] = useState(false); + const [notifMessage, setNotifMessage] = useState(""); + + const toggleSwitch = () => setIsEnabled(previousState => !previousState); + + return ( + + Reminder Notifications + + + Toggle On/Off + + + + + + ); +}; + +export default Notifications; + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: "#fff", + }, + title: { + position: "absolute", + font_family: 'Open Sans', + font_style: "normal", + font_weight: "400", + font_size: "14", + line_height: "150%", + /* or 21px */ + letter_spacing:" -0.019em", + marginTop: 20, + marginLeft: 10, + color: "#000000", + marginBottom: 50 + }, + textInput: { + borderRadius: 10, + borderWidth: .5, + backgroundColor: '#f2f2f2', + padding: 10, + width: 200, + textAlign: 'center', + marginVertical:7, + alignSelf: 'center', + marginTop:10, + }, +}); diff --git a/remo-client/screens/profile.tsx b/remo-client/screens/profile.tsx index 27e5905..a0891ee 100644 --- a/remo-client/screens/profile.tsx +++ b/remo-client/screens/profile.tsx @@ -8,7 +8,6 @@ import { import { StyleSheet, Text, - TouchableOpacity, View, Image, TextInput, @@ -45,6 +44,10 @@ export default function Profile() { navigation.navigate("GoogleSSO"); }; + const navigateNotifs = () => { + navigation.navigate("Notifications", {data: newData}); + } + const ethnicities: string[] = [ "White", "Black or African American", @@ -143,6 +146,8 @@ export default function Profile() { return item; }} /> + Reminder Notifications + { const navigation = useNavigation(); const handleRegister = () => { - fetch('https://f9a8-155-33-133-12.ngrok.io/v1/register', { + fetch('https://320b-155-33-133-12.ngrok.io/v1/register', { method: 'POST', headers: { 'Content-Type': 'application/json' diff --git a/remo-client/services/api_links.tsx b/remo-client/services/api_links.tsx index 4fe1839..3d5fc18 100644 --- a/remo-client/services/api_links.tsx +++ b/remo-client/services/api_links.tsx @@ -1,2 +1,2 @@ -export const API_URL = "https://f9a8-155-33-133-12.ngrok.io"; +export const API_URL = "https://320b-155-33-133-12.ngrok.io"; export const GBOOKS_API = "https://www.googleapis.com/books/v1/volumes?q=isbn:"; From 754ff3cf691e134a43393a7677f5c2ae8a6fae76 Mon Sep 17 00:00:00 2001 From: andrewcaplan1 Date: Sun, 2 Apr 2023 15:27:59 -0400 Subject: [PATCH 2/9] notif testing logic --- remo-client/package.json | 2 + remo-client/screens/googleSSO.tsx | 2 +- remo-client/screens/notifications.tsx | 135 ++++++++++++++++++++++++-- remo-client/screens/register.tsx | 2 +- remo-client/services/api_links.tsx | 2 +- 5 files changed, 132 insertions(+), 11 deletions(-) diff --git a/remo-client/package.json b/remo-client/package.json index 5a0121b..19cecad 100644 --- a/remo-client/package.json +++ b/remo-client/package.json @@ -25,7 +25,9 @@ "expo": "^47.0.13", "expo-auth-session": "^3.8.0", "expo-barcode-scanner": "~12.1.0", + "expo-device": "^5.2.1", "expo-font": "~11.0.1", + "expo-notifications": "^0.18.1", "expo-random": "^13.0.0", "expo-status-bar": "~1.4.2", "expo-web-browser": "~12.0.0", diff --git a/remo-client/screens/googleSSO.tsx b/remo-client/screens/googleSSO.tsx index 7f53ef5..e56b3d5 100644 --- a/remo-client/screens/googleSSO.tsx +++ b/remo-client/screens/googleSSO.tsx @@ -64,7 +64,7 @@ export default function GoogleSSO() { try { var res = await fetch( - "https://320b-155-33-133-12.ngrok.io/v1/login", { + "https://83c2-155-33-133-32.ngrok.io/v1/login", { method: "POST", credentials: "include", headers: { diff --git a/remo-client/screens/notifications.tsx b/remo-client/screens/notifications.tsx index c0e20cd..266b0f1 100644 --- a/remo-client/screens/notifications.tsx +++ b/remo-client/screens/notifications.tsx @@ -1,22 +1,80 @@ -import React, { useState } from 'react'; -import { View, TextInput, StyleSheet, Text, Switch} from 'react-native'; +import React, { useEffect, useState, useRef } from 'react'; +import { View, TextInput, StyleSheet, Text, Switch, Platform} from 'react-native'; import { useNavigation } from "@react-navigation/native"; - - +import * as Device from 'expo-device' +import * as Notification from 'expo-notifications'; import { useRoute } from "@react-navigation/native"; +Notification.setNotificationHandler({ + handleNotification: async () => ({ + shouldShowAlert: true, + shouldPlaySound: true, + shouldSetBadge: false, + }), +}); + const Notifications = () => { const route = useRoute(); const data = route.params?.data; const navigation = useNavigation(); const [isEnabled, setIsEnabled] = useState(false); - const [notifMessage, setNotifMessage] = useState(""); + const [notifMessage, setNotifMessage] = useState("Time to Read!"); + const [expoPushToken, setExpoPushToken] = useState(''); + const [notifTime, setNotifTime] = useState({hour: 12, minute: 0}) + const [notifDays, setNotifDays] = useState(new Set()) + // const notificationListener = useRef(); + // const responseListener = useRef(); + + // toggle switch changing state const toggleSwitch = () => setIsEnabled(previousState => !previousState); + + useEffect(() => { + registerForPushNotificationsAsync().then(token => setExpoPushToken(token!)); + + // notificationListener.current = Notification.addNotificationReceivedListener(notification => { + // setNotification(notification); + // }); + + // responseListener.current = Notification.addNotificationResponseReceivedListener(response => { + // console.log(response); + // }); + + // return () => { + // Notifications.removeNotificationSubscription(notificationListener.current); + // Notifications.removeNotificationSubscription(responseListener.current); + // }; + + }, []); + async function schedulePushNotification() { + + // if (type == scheduleType.Weekly) { + // trigger = { + // hour: schedule.hour, + // minute: schedule.minute, + // repeats: schedule.repeats, + // weekday: schedule.weekday + // } + // } + await Notification.scheduleNotificationAsync({ + content: { + title: "ReMo", + body: notifMessage, + // data: { data: 'goes here' }, + }, + trigger: { + hour: notifTime.hour, + minute: schedule.minute, + repeats: true, + weekday: schedule.weekday + } + }); + } + return ( Reminder Notifications @@ -40,9 +98,9 @@ const Notifications = () => { }}> Toggle On/Off { export default Notifications; +async function registerForPushNotificationsAsync()/*: Promise */{ + // notifications only work on physical devices + if (!Device.isDevice) { + alert("Must use physical device for Push Notifications. Must be ios or android."); + return null; + } + + // ask user for notification permissions + const { status } = await Notification.requestPermissionsAsync(); + if (status !== "granted") { + alert("Failed to get push token for push notification!"); + return null; + } + + // android needs notification channel with highest importance so notificaiton goes through always + if (Platform.OS === "android") { + Notification.setNotificationChannelAsync("default", { + name: "default", + importance: Notification.AndroidImportance.MAX, + // other notification settings that are customizable + // vibrationPattern: [0, 250, 250, 250], + // lightColor: '#FF231F7C', + }); + } + + // gets push notification token + const token = (await Notification.getExpoPushTokenAsync()).data; + console.log("ExpoPushToken: ", token) + + return token; +} + +// async function schedulePushNotification() { + +// // if (type == scheduleType.Weekly) { +// // trigger = { +// // hour: schedule.hour, +// // minute: schedule.minute, +// // repeats: schedule.repeats, +// // weekday: schedule.weekday +// // } +// // } +// await Notification.scheduleNotificationAsync({ +// content: { +// title: "You've got mail! 📬", +// body: , +// data: { data: 'goes here' }, +// }, +// trigger: trigger +// }); +// } +// export {schedulePushNotification}; + + + + + + + + + const styles = StyleSheet.create({ container: { flex: 1, diff --git a/remo-client/screens/register.tsx b/remo-client/screens/register.tsx index e5a4a4f..03b711e 100644 --- a/remo-client/screens/register.tsx +++ b/remo-client/screens/register.tsx @@ -7,7 +7,7 @@ const RegisterScreen = () => { const navigation = useNavigation(); const handleRegister = () => { - fetch('https://320b-155-33-133-12.ngrok.io/v1/register', { + fetch('https://83c2-155-33-133-32.ngrok.io/v1/register', { method: 'POST', headers: { 'Content-Type': 'application/json' diff --git a/remo-client/services/api_links.tsx b/remo-client/services/api_links.tsx index 3d5fc18..635609d 100644 --- a/remo-client/services/api_links.tsx +++ b/remo-client/services/api_links.tsx @@ -1,2 +1,2 @@ -export const API_URL = "https://320b-155-33-133-12.ngrok.io"; +export const API_URL = "https://83c2-155-33-133-32.ngrok.io"; export const GBOOKS_API = "https://www.googleapis.com/books/v1/volumes?q=isbn:"; From 9215929320d9bbe02d564dec56d88755e546c886 Mon Sep 17 00:00:00 2001 From: andrewcaplan1 Date: Sun, 2 Apr 2023 17:26:02 -0400 Subject: [PATCH 3/9] added weekday picker and weekday notification logic --- remo-client/package-lock.json | 753 ++++++++++++++++++++++++++ remo-client/package.json | 1 + remo-client/screens/googleSSO.tsx | 2 +- remo-client/screens/notifications.tsx | 126 +++-- remo-client/yarn.lock | 247 ++++++++- 5 files changed, 1083 insertions(+), 46 deletions(-) diff --git a/remo-client/package-lock.json b/remo-client/package-lock.json index f1749d2..0912192 100644 --- a/remo-client/package-lock.json +++ b/remo-client/package-lock.json @@ -24,7 +24,9 @@ "expo": "^47.0.13", "expo-auth-session": "^3.8.0", "expo-barcode-scanner": "~12.1.0", + "expo-device": "^5.2.1", "expo-font": "~11.0.1", + "expo-notifications": "^0.18.1", "expo-random": "^13.0.0", "expo-status-bar": "~1.4.2", "expo-web-browser": "~12.0.0", @@ -39,6 +41,7 @@ "react-native-dropdown-picker": "^5.4.4", "react-native-elements": "^3.4.3", "react-native-modal": "^13.0.1", + "react-native-picker-weekday": "^1.1.2", "react-native-progress-bar": "^0.1.2", "react-native-progress-steps": "^1.3.4", "react-native-safe-area-context": "4.4.1", @@ -3360,6 +3363,11 @@ "@hapi/hoek": "^9.0.0" } }, + "node_modules/@ide/backoff": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@ide/backoff/-/backoff-1.0.0.tgz", + "integrity": "sha512-F0YfUDjvT+Mtt/R4xdl2X0EYCHMMiJqNLdxHD++jDT5ydEFIyqbCHh51Qx2E211dgZprPKhV7sHmnXKpLuvc5g==" + }, "node_modules/@jest/create-cache-key-function": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.3.1.tgz", @@ -4928,6 +4936,17 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "license": "MIT" }, + "node_modules/assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "dependencies": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, "node_modules/assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -4995,6 +5014,17 @@ "node": ">= 4.5.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", @@ -5159,6 +5189,11 @@ "@babel/core": "^7.0.0" } }, + "node_modules/badgin": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/badgin/-/badgin-1.2.3.tgz", + "integrity": "sha512-NQGA7LcfCpSzIbGRbkgjgdWkjy7HI+Th5VLxTJfW5EeaAf3fnS+xWQaQOCYiny+q6QSvxqoSO04vCx+4u++EJw==" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -6539,6 +6574,21 @@ "node": ">=8" } }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -6945,6 +6995,11 @@ "dev": true, "peer": true }, + "node_modules/es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -7227,6 +7282,17 @@ "expo": "*" } }, + "node_modules/expo-device": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/expo-device/-/expo-device-5.2.1.tgz", + "integrity": "sha512-ZWGph+fGQPxo9v2e0YygPb45Hl+ZR3mh4tpLY5AOYK/sNjQy+Lu3T/sLGIdi2TOcYNL2oZwzZ6eGvwVYmdIfLg==", + "dependencies": { + "ua-parser-js": "^0.7.33" + }, + "peerDependencies": { + "expo": "*" + } + }, "node_modules/expo-error-recovery": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/expo-error-recovery/-/expo-error-recovery-4.0.1.tgz", @@ -7332,6 +7398,195 @@ "invariant": "^2.2.4" } }, + "node_modules/expo-notifications": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/expo-notifications/-/expo-notifications-0.18.1.tgz", + "integrity": "sha512-lOEiuPE6ubkS5u7Nj/57gkmUGD/MxsRTC6bg9SGJqXIitBQZk3Tmv9y8bjTrn71n7DsrH8K7xCZTbVwr+kLQGg==", + "dependencies": { + "@expo/image-utils": "^0.3.18", + "@ide/backoff": "^1.0.0", + "abort-controller": "^3.0.0", + "assert": "^2.0.0", + "badgin": "^1.1.5", + "expo-application": "~5.1.0", + "expo-constants": "~14.2.0", + "fs-extra": "^9.1.0", + "uuid": "^3.4.0" + }, + "peerDependencies": { + "expo": "*" + } + }, + "node_modules/expo-notifications/node_modules/@expo/config": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@expo/config/-/config-8.0.2.tgz", + "integrity": "sha512-WubrzTNNdAXy1FU8TdyQ7D9YtDj2tN3fWXDq+C8In+nB7Qc08zwH9cVdaGZ+rBVmjFZBh5ACfObKq/m9cm4QQA==", + "dependencies": { + "@babel/code-frame": "~7.10.4", + "@expo/config-plugins": "~6.0.0", + "@expo/config-types": "^48.0.0", + "@expo/json-file": "^8.2.37", + "getenv": "^1.0.0", + "glob": "7.1.6", + "require-from-string": "^2.0.2", + "resolve-from": "^5.0.0", + "semver": "7.3.2", + "slugify": "^1.3.4", + "sucrase": "^3.20.0" + } + }, + "node_modules/expo-notifications/node_modules/@expo/config-plugins": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-6.0.1.tgz", + "integrity": "sha512-6mqZutxeibXFeqFfoZApFUEH2n1RxGXYMHCdJrDj4eXDBBFZ3aJ0XBoroZcHHHvfRieEsf54vNyJoWp7JZGj8g==", + "dependencies": { + "@expo/config-types": "^48.0.0", + "@expo/json-file": "~8.2.37", + "@expo/plist": "^0.0.20", + "@expo/sdk-runtime-versions": "^1.0.0", + "@react-native/normalize-color": "^2.0.0", + "chalk": "^4.1.2", + "debug": "^4.3.1", + "find-up": "~5.0.0", + "getenv": "^1.0.0", + "glob": "7.1.6", + "resolve-from": "^5.0.0", + "semver": "^7.3.5", + "slash": "^3.0.0", + "xcode": "^3.0.1", + "xml2js": "0.4.23" + } + }, + "node_modules/expo-notifications/node_modules/@expo/config-plugins/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/expo-notifications/node_modules/@expo/config-types": { + "version": "48.0.0", + "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-48.0.0.tgz", + "integrity": "sha512-DwyV4jTy/+cLzXGAo1xftS6mVlSiLIWZjl9DjTCLPFVgNYQxnh7htPilRv4rBhiNs7KaznWqKU70+4zQoKVT9A==" + }, + "node_modules/expo-notifications/node_modules/@expo/plist": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.0.20.tgz", + "integrity": "sha512-UXQ4LXCfTZ580LDHGJ5q62jSTwJFFJ1GqBu8duQMThiHKWbMJ+gajJh6rsB6EJ3aLUr9wcauxneL5LVRFxwBEA==", + "dependencies": { + "@xmldom/xmldom": "~0.7.7", + "base64-js": "^1.2.3", + "xmlbuilder": "^14.0.0" + } + }, + "node_modules/expo-notifications/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/expo-notifications/node_modules/expo-application": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/expo-application/-/expo-application-5.1.1.tgz", + "integrity": "sha512-aDatTcTTCdTbHw8h4/Tq2ilc6InM5ntF9xWCJdOcnUEcglxxGphVI/lzJKBaBF6mJECA8mEOjpVg2EGxOctTwg==", + "peerDependencies": { + "expo": "*" + } + }, + "node_modules/expo-notifications/node_modules/expo-constants": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-14.2.1.tgz", + "integrity": "sha512-DD5u4QmBds2U7uYo409apV7nX+XjudARcgqe7S9aRFJ/6kyftmuxvk1DpaU4X42Av8z/tfKwEpuxl+vl7HHx/Q==", + "dependencies": { + "@expo/config": "~8.0.0", + "uuid": "^3.3.2" + }, + "peerDependencies": { + "expo": "*" + } + }, + "node_modules/expo-notifications/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/expo-notifications/node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/expo-notifications/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/expo-notifications/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/expo-notifications/node_modules/semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/expo-notifications/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/expo-random": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/expo-random/-/expo-random-13.0.0.tgz", @@ -7661,6 +7916,14 @@ "resolved": "https://registry.npmjs.org/fontfaceobserver/-/fontfaceobserver-2.3.0.tgz", "integrity": "sha512-6FPvD/IVyT4ZlNe7Wcn5Fb/4ChigpucKYSvD6a+0iMoLn2inpo711eyIcKjmDtE5XNcgAkSH9uN/nfAeZzHEfg==" }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -7924,6 +8187,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/got": { "version": "11.8.6", "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", @@ -7997,6 +8271,17 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -8008,6 +8293,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -8393,6 +8692,21 @@ "node": ">=0.10.0" } }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -8417,6 +8731,17 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "license": "MIT" }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-core-module": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", @@ -8505,6 +8830,20 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -8556,6 +8895,21 @@ "node": ">=0.10.0" } }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -8633,6 +8987,24 @@ "node": ">=0.10.0" } }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -10526,6 +10898,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -11939,6 +12334,15 @@ "react-native": ">=0.65.0" } }, + "node_modules/react-native-picker-weekday": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/react-native-picker-weekday/-/react-native-picker-weekday-1.1.2.tgz", + "integrity": "sha512-klJPZ/CZ/Q4iVqJKs1QFTetoHTrOV3jRE199MM4/vn1TtNM7ezpHctGLkK9SYFDeORYH1M1VrEgme0jy9vn8FQ==", + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/react-native-progress-bar": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/react-native-progress-bar/-/react-native-progress-bar-0.1.2.tgz", @@ -14419,6 +14823,18 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -14614,6 +15030,25 @@ "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", "license": "ISC" }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wonka": { "version": "4.0.15", "resolved": "https://registry.npmjs.org/wonka/-/wonka-4.0.15.tgz", @@ -17111,6 +17546,11 @@ "@hapi/hoek": "^9.0.0" } }, + "@ide/backoff": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@ide/backoff/-/backoff-1.0.0.tgz", + "integrity": "sha512-F0YfUDjvT+Mtt/R4xdl2X0EYCHMMiJqNLdxHD++jDT5ydEFIyqbCHh51Qx2E211dgZprPKhV7sHmnXKpLuvc5g==" + }, "@jest/create-cache-key-function": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.3.1.tgz", @@ -18375,6 +18815,17 @@ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, + "assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "requires": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -18418,6 +18869,11 @@ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" + }, "axios": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", @@ -18558,6 +19014,11 @@ "babel-plugin-syntax-trailing-function-commas": "^7.0.0-beta.0" } }, + "badgin": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/badgin/-/badgin-1.2.3.tgz", + "integrity": "sha512-NQGA7LcfCpSzIbGRbkgjgdWkjy7HI+Th5VLxTJfW5EeaAf3fnS+xWQaQOCYiny+q6QSvxqoSO04vCx+4u++EJw==" + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -19554,6 +20015,15 @@ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -19848,6 +20318,11 @@ "dev": true, "peer": true }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -20053,6 +20528,14 @@ "integrity": "sha512-2KC52eLYsXndDZOVFyr+K3Zs9wDgpqZ7F7fwAiUg+yNbE21CJrHKDFvo/Br0FAaDf/w9pUks5/qi1azB5sDzvg==", "requires": {} }, + "expo-device": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/expo-device/-/expo-device-5.2.1.tgz", + "integrity": "sha512-ZWGph+fGQPxo9v2e0YygPb45Hl+ZR3mh4tpLY5AOYK/sNjQy+Lu3T/sLGIdi2TOcYNL2oZwzZ6eGvwVYmdIfLg==", + "requires": { + "ua-parser-js": "^0.7.33" + } + }, "expo-error-recovery": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/expo-error-recovery/-/expo-error-recovery-4.0.1.tgz", @@ -20139,6 +20622,156 @@ "invariant": "^2.2.4" } }, + "expo-notifications": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/expo-notifications/-/expo-notifications-0.18.1.tgz", + "integrity": "sha512-lOEiuPE6ubkS5u7Nj/57gkmUGD/MxsRTC6bg9SGJqXIitBQZk3Tmv9y8bjTrn71n7DsrH8K7xCZTbVwr+kLQGg==", + "requires": { + "@expo/image-utils": "^0.3.18", + "@ide/backoff": "^1.0.0", + "abort-controller": "^3.0.0", + "assert": "^2.0.0", + "badgin": "^1.1.5", + "expo-application": "~5.1.0", + "expo-constants": "~14.2.0", + "fs-extra": "^9.1.0", + "uuid": "^3.4.0" + }, + "dependencies": { + "@expo/config": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@expo/config/-/config-8.0.2.tgz", + "integrity": "sha512-WubrzTNNdAXy1FU8TdyQ7D9YtDj2tN3fWXDq+C8In+nB7Qc08zwH9cVdaGZ+rBVmjFZBh5ACfObKq/m9cm4QQA==", + "requires": { + "@babel/code-frame": "~7.10.4", + "@expo/config-plugins": "~6.0.0", + "@expo/config-types": "^48.0.0", + "@expo/json-file": "^8.2.37", + "getenv": "^1.0.0", + "glob": "7.1.6", + "require-from-string": "^2.0.2", + "resolve-from": "^5.0.0", + "semver": "7.3.2", + "slugify": "^1.3.4", + "sucrase": "^3.20.0" + } + }, + "@expo/config-plugins": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-6.0.1.tgz", + "integrity": "sha512-6mqZutxeibXFeqFfoZApFUEH2n1RxGXYMHCdJrDj4eXDBBFZ3aJ0XBoroZcHHHvfRieEsf54vNyJoWp7JZGj8g==", + "requires": { + "@expo/config-types": "^48.0.0", + "@expo/json-file": "~8.2.37", + "@expo/plist": "^0.0.20", + "@expo/sdk-runtime-versions": "^1.0.0", + "@react-native/normalize-color": "^2.0.0", + "chalk": "^4.1.2", + "debug": "^4.3.1", + "find-up": "~5.0.0", + "getenv": "^1.0.0", + "glob": "7.1.6", + "resolve-from": "^5.0.0", + "semver": "^7.3.5", + "slash": "^3.0.0", + "xcode": "^3.0.1", + "xml2js": "0.4.23" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@expo/config-types": { + "version": "48.0.0", + "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-48.0.0.tgz", + "integrity": "sha512-DwyV4jTy/+cLzXGAo1xftS6mVlSiLIWZjl9DjTCLPFVgNYQxnh7htPilRv4rBhiNs7KaznWqKU70+4zQoKVT9A==" + }, + "@expo/plist": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.0.20.tgz", + "integrity": "sha512-UXQ4LXCfTZ580LDHGJ5q62jSTwJFFJ1GqBu8duQMThiHKWbMJ+gajJh6rsB6EJ3aLUr9wcauxneL5LVRFxwBEA==", + "requires": { + "@xmldom/xmldom": "~0.7.7", + "base64-js": "^1.2.3", + "xmlbuilder": "^14.0.0" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "expo-application": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/expo-application/-/expo-application-5.1.1.tgz", + "integrity": "sha512-aDatTcTTCdTbHw8h4/Tq2ilc6InM5ntF9xWCJdOcnUEcglxxGphVI/lzJKBaBF6mJECA8mEOjpVg2EGxOctTwg==", + "requires": {} + }, + "expo-constants": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-14.2.1.tgz", + "integrity": "sha512-DD5u4QmBds2U7uYo409apV7nX+XjudARcgqe7S9aRFJ/6kyftmuxvk1DpaU4X42Av8z/tfKwEpuxl+vl7HHx/Q==", + "requires": { + "@expo/config": "~8.0.0", + "uuid": "^3.3.2" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + } + } + }, "expo-random": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/expo-random/-/expo-random-13.0.0.tgz", @@ -20393,6 +21026,14 @@ "resolved": "https://registry.npmjs.org/fontfaceobserver/-/fontfaceobserver-2.3.0.tgz", "integrity": "sha512-6FPvD/IVyT4ZlNe7Wcn5Fb/4ChigpucKYSvD6a+0iMoLn2inpo711eyIcKjmDtE5XNcgAkSH9uN/nfAeZzHEfg==" }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -20573,6 +21214,14 @@ "slash": "^3.0.0" } }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "got": { "version": "11.8.6", "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", @@ -20622,11 +21271,27 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "requires": { + "get-intrinsic": "^1.1.1" + } + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + } + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -20908,6 +21573,15 @@ "kind-of": "^6.0.0" } }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -20927,6 +21601,11 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" + }, "is-core-module": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", @@ -20978,6 +21657,14 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -21014,6 +21701,15 @@ } } }, + "is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -21065,6 +21761,18 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==" }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -22504,6 +23212,20 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -23543,6 +24265,12 @@ "react-native-animatable": "1.3.3" } }, + "react-native-picker-weekday": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/react-native-picker-weekday/-/react-native-picker-weekday-1.1.2.tgz", + "integrity": "sha512-klJPZ/CZ/Q4iVqJKs1QFTetoHTrOV3jRE199MM4/vn1TtNM7ezpHctGLkK9SYFDeORYH1M1VrEgme0jy9vn8FQ==", + "requires": {} + }, "react-native-progress-bar": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/react-native-progress-bar/-/react-native-progress-bar-0.1.2.tgz", @@ -25341,6 +26069,18 @@ "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", "requires": {} }, + "util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -25491,6 +26231,19 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==" }, + "which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + }, "wonka": { "version": "4.0.15", "resolved": "https://registry.npmjs.org/wonka/-/wonka-4.0.15.tgz", diff --git a/remo-client/package.json b/remo-client/package.json index 19cecad..0b5d65e 100644 --- a/remo-client/package.json +++ b/remo-client/package.json @@ -42,6 +42,7 @@ "react-native-dropdown-picker": "^5.4.4", "react-native-elements": "^3.4.3", "react-native-modal": "^13.0.1", + "react-native-picker-weekday": "^1.1.2", "react-native-progress-bar": "^0.1.2", "react-native-progress-steps": "^1.3.4", "react-native-safe-area-context": "4.4.1", diff --git a/remo-client/screens/googleSSO.tsx b/remo-client/screens/googleSSO.tsx index e56b3d5..cc30429 100644 --- a/remo-client/screens/googleSSO.tsx +++ b/remo-client/screens/googleSSO.tsx @@ -64,7 +64,7 @@ export default function GoogleSSO() { try { var res = await fetch( - "https://83c2-155-33-133-32.ngrok.io/v1/login", { + "https://d510-155-33-133-32.ngrok.io/v1/login", { method: "POST", credentials: "include", headers: { diff --git a/remo-client/screens/notifications.tsx b/remo-client/screens/notifications.tsx index 266b0f1..1626771 100644 --- a/remo-client/screens/notifications.tsx +++ b/remo-client/screens/notifications.tsx @@ -3,9 +3,11 @@ import { View, TextInput, StyleSheet, Text, Switch, Platform} from 'react-native import { useNavigation } from "@react-navigation/native"; import * as Device from 'expo-device' import * as Notification from 'expo-notifications'; +import { DayPicker } from 'react-native-picker-weekday'; import { useRoute } from "@react-navigation/native"; +import { Button } from '@rneui/base'; Notification.setNotificationHandler({ handleNotification: async () => ({ @@ -23,11 +25,19 @@ const Notifications = () => { const [isEnabled, setIsEnabled] = useState(false); const [notifMessage, setNotifMessage] = useState("Time to Read!"); const [expoPushToken, setExpoPushToken] = useState(''); - const [notifTime, setNotifTime] = useState({hour: 12, minute: 0}) - const [notifDays, setNotifDays] = useState(new Set()) + const [notifTime, setNotifTime] = useState({hour: 17, minute: 21}); + const [weekdays, setWeekdays] = React.useState([]); + // days of the week is the binary of selected days of the week, + // ei. 127 = all days of the week, 0 = no days of the week + + // const [notifDays, setNotifDays] = useState([false, false, false, false, false, false, false]) + // const [mon, setMon] = useState() // const notificationListener = useRef(); // const responseListener = useRef(); + + + // toggle switch changing state const toggleSwitch = () => setIsEnabled(previousState => !previousState); @@ -51,33 +61,36 @@ const Notifications = () => { }, []); async function schedulePushNotification() { - - // if (type == scheduleType.Weekly) { - // trigger = { - // hour: schedule.hour, - // minute: schedule.minute, - // repeats: schedule.repeats, - // weekday: schedule.weekday - // } - // } - await Notification.scheduleNotificationAsync({ - content: { - title: "ReMo", - body: notifMessage, - // data: { data: 'goes here' }, - }, - trigger: { - hour: notifTime.hour, - minute: schedule.minute, - repeats: true, - weekday: schedule.weekday - } - }); + // get list of days of the week as list of numbers + // const days = notifDays.reduce( + // (out, bool, index) => (bool ? out.concat(index + 1) : out), [] as number[]) + console.log(weekdays) + weekdays.forEach((day) => { + // console.log(day); + Notification.scheduleNotificationAsync({ + content: { + title: "ReMo", + body: notifMessage, + // data: { data: 'goes here' }, + }, + trigger: { + hour: notifTime.hour, + minute: notifTime.minute, + repeats: true, + weekday: day, + } + }); + }) } - + // const onButtonpress = () => { + // const addDay = (day: number) => { + // let days = notifDays; + // days[day] = true; + // setNotifDays(days) + // }} return ( - Reminder Notifications + Reminder Notifications { style={styles.textInput} /> - + +