diff --git a/frontend/compositions/index.tsx b/frontend/compositions/index.tsx index 369fada4..b3c0d1a2 100644 --- a/frontend/compositions/index.tsx +++ b/frontend/compositions/index.tsx @@ -10,6 +10,8 @@ import PasswordAid from "./password-aid/password-aid" import EditProfileInfo from "./profile-edit" import ProfileInfo from "./profile-info" import ProfileNav from "./profile-nav" +import ProfileNotifications from "./profile-notifications/profile-notifications" +import ProfileOrganizations from "./profile-organizations/profile-organizations" import SavedResults from "./profile-saved-tables/saved-results" import SavedSearches from "./profile-saved-tables/saved-searches" import ProfileType from "./profile-type" @@ -29,6 +31,8 @@ export { PasswordAid, ProfileInfo, ProfileNav, + ProfileNotifications, + ProfileOrganizations, ProfileType, RegistrationResponse, SavedResults, diff --git a/frontend/compositions/profile-nav/index.tsx b/frontend/compositions/profile-nav/index.tsx index ccd366d1..c4d6ddeb 100644 --- a/frontend/compositions/profile-nav/index.tsx +++ b/frontend/compositions/profile-nav/index.tsx @@ -1,28 +1,24 @@ import * as React from "react" -import { ProfileMenu } from "../../models/profile" +import { ProfileMenu, profileMenuItems } from "../../models/profile" import styles from "./profile-nav.module.css" interface ProfileNavProps { - currentItem: ProfileMenu - selectNav: Function + activePage: ProfileMenu + setActivePage: React.Dispatch> } -const menuItems = [ - { item: ProfileMenu.USER_INFO, text: "User Information" }, - { item: ProfileMenu.PROFILE_TYPE, text: "Profile Type" }, - { item: ProfileMenu.SAVED_RESULTS, text: "Saved Results" }, - { item: ProfileMenu.SAVED_SEARCHES, text: "Saved Searches" } -] - -export default function ProfileNav({ currentItem, selectNav }: ProfileNavProps) { - const clsName = (itm: string) => (itm === currentItem ? styles.selectedItem : styles.menuItem) +export default function ProfileNav({ activePage, setActivePage }: ProfileNavProps) { + const clsName = (item: string) => (item === activePage ? styles.selectedItem : styles.menuItem) return (
=16.9.0": +"@types/react-dom@*", "@types/react-dom@>=16.9.0": "integrity" "sha512-wIvGxLfgpVDSAMH5utdL9Ngm5Owu0VsGmldro3ORLXV8CShrL8awVj06NuEXFQ5xyaYfdca7Sgbk/50Ri1GdPg==" "resolved" "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.9.tgz" "version" "17.0.9" @@ -3214,7 +3532,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^17.0.5", "@types/react@>=16.9.0": +"@types/react@*", "@types/react@^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react@^16.9.0 || ^17.0.0 || ^18.0.0", "@types/react@^17.0.5", "@types/react@>=16.9.0": "integrity" "sha512-zgiJwtsggVGtr53MndV7jfiUESTqrbxOcBvwfe6KS/9bzaVPCTDieTWnFNecVNx6EAaapg5xsLLWFfHHR437AA==" "resolved" "https://registry.npmjs.org/@types/react/-/react-17.0.27.tgz" "version" "17.0.27" @@ -3945,6 +4263,13 @@ dependencies: "sprintf-js" "~1.0.2" +"aria-hidden@^1.1.1": + "integrity" "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==" + "resolved" "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz" + "version" "1.2.3" + dependencies: + "tslib" "^2.0.0" + "aria-query@^4.2.2": "integrity" "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==" "resolved" "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz" @@ -6055,6 +6380,11 @@ "resolved" "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" "version" "3.1.0" +"detect-node-es@^1.1.0": + "integrity" "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" + "resolved" "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz" + "version" "1.1.0" + "detect-port-alt@1.1.6": "integrity" "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==" "resolved" "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz" @@ -7377,6 +7707,11 @@ "has" "^1.0.3" "has-symbols" "^1.0.1" +"get-nonce@^1.0.0": + "integrity" "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==" + "resolved" "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz" + "version" "1.0.1" + "get-orientation@1.1.2": "integrity" "sha512-/pViTfifW+gBbh/RnlFYHINvELT9Znt+SYyDKAUL6uV6By019AK/s+i9XP4jSwq7lwP38Fd8HVeTxym3+hkwmQ==" "resolved" "https://registry.npmjs.org/get-orientation/-/get-orientation-1.1.2.tgz" @@ -11518,7 +11853,7 @@ "node-dir" "^0.1.10" "strip-indent" "^3.0.0" -"react-dom@*", "react-dom@^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1", "react-dom@^16.6.0 || ^17.0.0", "react-dom@^16.8.0 || ^17.0.0", "react-dom@^17.0.2", "react-dom@>= 16.3.0", "react-dom@>=16.14.0", "react-dom@>=16.8.0", "react-dom@>=16.9.0", "react-dom@15.x || 16.x || 16.4.0-alpha.0911da3": +"react-dom@*", "react-dom@^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1", "react-dom@^16.6.0 || ^17.0.0", "react-dom@^16.8 || ^17.0 || ^18.0", "react-dom@^16.8.0 || ^17.0.0", "react-dom@^17.0.2", "react-dom@>= 16.3.0", "react-dom@>=16.14.0", "react-dom@>=16.8.0", "react-dom@>=16.9.0", "react-dom@15.x || 16.x || 16.4.0-alpha.0911da3": "integrity" "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==" "resolved" "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz" "version" "17.0.2" @@ -11571,10 +11906,10 @@ "react-fast-compare" "^3.2.0" "shallowequal" "^1.1.0" -"react-hook-form@^7.15.0": - "integrity" "sha512-9nQ+qKFHFpnWzQHdDh6F4Egxa8iJkue1KU921F8qqeyUVbPPjgQZDXaQyNHABEYjRh0ndjTI24GDA+lwm2lQdg==" - "resolved" "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.17.1.tgz" - "version" "7.17.1" +"react-hook-form@^7.0.0", "react-hook-form@^7.25.0": + "integrity" "sha512-MyF4YXegIT/vfyZloTm98mpJwLUPfULdX37yPzXeijT1hePCkV8DN1IAnEufxgtqCpc7aFGRinegQwisUGZCnA==" + "resolved" "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.25.0.tgz" + "version" "7.25.0" "react-inspector@^5.1.0": "integrity" "sha512-GURDaYzoLbW8pMGXwYPDBIv6nqei4kK7LPRZ9q9HCZF54wqXz/dnylBp/kfE9XmekBhHvLDdcYeyIwSrvtOiWg==" @@ -11627,6 +11962,25 @@ "resolved" "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz" "version" "0.8.3" +"react-remove-scroll-bar@^2.3.3": + "integrity" "sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==" + "resolved" "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz" + "version" "2.3.4" + dependencies: + "react-style-singleton" "^2.2.1" + "tslib" "^2.0.0" + +"react-remove-scroll@2.5.5": + "integrity" "sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==" + "resolved" "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz" + "version" "2.5.5" + dependencies: + "react-remove-scroll-bar" "^2.3.3" + "react-style-singleton" "^2.2.1" + "tslib" "^2.1.0" + "use-callback-ref" "^1.3.0" + "use-sidecar" "^1.1.2" + "react-responsive@^9.0.0-beta.4": "integrity" "sha512-jQSs5kIi38T39Ku98r8s75jM6JAaNEeVrHPHTrL2EYWuv8nusV3KRQcZZ4VlfwndIRedxmpb4T8FXA9ltlCFiw==" "resolved" "https://registry.npmjs.org/react-responsive/-/react-responsive-9.0.0-beta.4.tgz" @@ -11655,6 +12009,15 @@ "shallowequal" "^1.1.0" "throttle-debounce" "^3.0.1" +"react-style-singleton@^2.2.1": + "integrity" "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==" + "resolved" "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz" + "version" "2.2.1" + dependencies: + "get-nonce" "^1.0.0" + "invariant" "^2.2.4" + "tslib" "^2.0.0" + "react-syntax-highlighter@^13.5.3": "integrity" "sha512-crPaF+QGPeHNIblxxCdf2Lg936NAHKhNhuMzRL3F9ct6aYXL3NcZtCL0Rms9+qVo6Y1EQLdXGypBNSbPL/r+qg==" "resolved" "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-13.5.3.tgz" @@ -11698,7 +12061,7 @@ "@floating-ui/dom" "^1.0.0" "classnames" "^2.3.0" -"react@*", "react@^0.14.0 || ^15.0.0 || ^16.0.0", "react@^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1", "react@^16.0.0 || ^17.0.0", "react@^16.13.1 || ^17.0.0", "react@^16.6.0 || ^17.0.0", "react@^16.8.0 || ^17", "react@^16.8.0 || ^17.0.0", "react@^16.8.3 || ^17.0.0-0", "react@^16.8.4 || ^17.0.0", "react@^17.0.2", "react@>= 0.14.0", "react@>= 16.3.0", "react@>= 16.8.0 || 17.x.x || 18.x.x", "react@>=16.12.0", "react@>=16.13.1", "react@>=16.14.0", "react@>=16.3.0", "react@>=16.8.0", "react@>=16.9.0", "react@>=16.x", "react@>=17.0.0", "react@15.x || 16.x || 16.4.0-alpha.0911da3", "react@17.0.2": +"react@*", "react@^0.14.0 || ^15.0.0 || ^16.0.0", "react@^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1", "react@^16.0.0 || ^17.0.0", "react@^16.13.1 || ^17.0.0", "react@^16.6.0 || ^17.0.0", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || ^17", "react@^16.8.0 || ^17.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.8.3 || ^17.0.0-0", "react@^16.8.4 || ^17.0.0", "react@^17.0.2", "react@>= 0.14.0", "react@>= 16.3.0", "react@>= 16.8.0 || 17.x.x || 18.x.x", "react@>=16.12.0", "react@>=16.13.1", "react@>=16.14.0", "react@>=16.3.0", "react@>=16.8.0", "react@>=16.9.0", "react@>=16.x", "react@>=17.0.0", "react@15.x || 16.x || 16.4.0-alpha.0911da3", "react@17.0.2": "integrity" "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==" "resolved" "https://registry.npmjs.org/react/-/react-17.0.2.tgz" "version" "17.0.2" @@ -13553,7 +13916,7 @@ "resolved" "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" "version" "1.14.1" -"tslib@^2.0.0", "tslib@^2.0.1", "tslib@^2.0.3", "tslib@^2.3.0": +"tslib@^2.0.0", "tslib@^2.0.1", "tslib@^2.0.3", "tslib@^2.1.0", "tslib@^2.3.0": "integrity" "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" "resolved" "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz" "version" "2.3.1" @@ -13861,6 +14224,13 @@ "punycode" "1.3.2" "querystring" "0.2.0" +"use-callback-ref@^1.3.0": + "integrity" "sha512-Lg4Vx1XZQauB42Hw3kK7JM6yjVjgFmFC5/Ab797s79aARomD2nEErc4mCgM8EZrARLmmbWpi5DGCadmK50DcAQ==" + "resolved" "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.1.tgz" + "version" "1.3.1" + dependencies: + "tslib" "^2.0.0" + "use-composed-ref@^1.0.0": "integrity" "sha512-my1lNHGWsSDAhhVAT4MKs6IjBUtG6ZG11uUqexPH9PptiIZDQOzaF4f5tEbJ2+7qvNbtXNBbU3SfmN+fXlWDhg==" "resolved" "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.1.0.tgz" @@ -13887,6 +14257,14 @@ dependencies: "resize-observer-polyfill" "^1.5.1" +"use-sidecar@^1.1.2": + "integrity" "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==" + "resolved" "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz" + "version" "1.1.2" + dependencies: + "detect-node-es" "^1.1.0" + "tslib" "^2.0.0" + "use-subscription@1.5.1": "integrity" "sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA==" "resolved" "https://registry.npmjs.org/use-subscription/-/use-subscription-1.5.1.tgz" @@ -14461,6 +14839,11 @@ "resolved" "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" "version" "0.1.0" +"zod@^3.22.4": + "integrity" "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==" + "resolved" "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz" + "version" "3.22.4" + "zwitch@^1.0.0": "integrity" "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==" "resolved" "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz"