UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

441 lines (440 loc) 16.2 kB
import { jsxs as r, jsx as e } from "react/jsx-runtime"; import { ReactComponent as w } from "../../assets/homepage/facebook.svg.js"; import { ReactComponent as y } from "../../assets/homepage/github.svg.js"; import { ReactComponent as u } from "../../assets/homepage/instagram.svg.js"; import { ReactComponent as b } from "../../assets/homepage/linkedin.svg.js"; import { ReactComponent as k } from "../../assets/homepage/twitter.svg.js"; import { ReactComponent as S } from "../../assets/homepage/youtube.svg.js"; import C from "../../assets/icons/SageFullLogo.js"; import R from "../../assets/icons/SynapseFullLogo.js"; import "../../utils/PermissionLevelToAccessType.js"; import { SYNAPSE_REALM as v } from "../../utils/SynapseConstants.js"; import "react"; import "../../synapse-client/SynapseClient.js"; import "@sage-bionetworks/synapse-client/generated/models/ErrorResponseCode"; import "@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse"; import "@sage-bionetworks/synapse-client/util/SynapseClientError"; import "@sage-bionetworks/synapse-types"; import "../../utils/functions/EntityTypeUtils.js"; import "lodash-es"; import "@sage-bionetworks/synapse-client/util/synapseClientFetch"; import { useOneSageURL as a } from "../../utils/hooks/useOneSageURL.js"; import "use-deep-compare-effect"; import "../../utils/context/SynapseContext.js"; import "@tanstack/react-query"; import "@tanstack/query-core"; import "lodash-es/isEmpty"; import "lodash-es/isEqual"; import "lodash-es/xorWith"; import { Box as o, Typography as t, Button as s, Stack as L, Tooltip as F, IconButton as z } from "@mui/material"; import "@sage-bionetworks/synapse-client"; import "../../utils/types/IsType.js"; import "../../utils/hooks/useCookiePreferences.js"; import "../../utils/hooks/useSourceAppConfigs.js"; import "universal-cookie"; import { useApplicationSessionContext as G } from "../../utils/AppUtils/session/ApplicationSessionContext.js"; import "../../utils/context/FullContextProvider.js"; import "../../utils/context/DocumentMetadataContext.js"; import '../../style/components/_spinner.css';/* empty css */ import "react-router"; import P from "../ExperimentalMode/ExperimentalMode.js"; import { PLANS_LINK as B } from "../SynapseHomepageV2/SynapseHomepageNavBar.js"; import { SynapseLinksColumn as p } from "./SynapseLinksColumn.js"; import { LogoutTwoTone as W } from "@mui/icons-material"; import { useGetCurrentRealm as _ } from "../../synapse-queries/realm/useRealmPrincipals.js"; const j = (/* @__PURE__ */ new Date()).getFullYear(); function ve({ portalVersion: l, srcVersion: c, repoVersion: m, gotoPlace: f, onExperimentalModeToggle: x }) { const { isAuthenticated: i, clearSession: h } = G(), { data: n } = _(), d = a("/register1"), g = a("/sageresources"); return /* @__PURE__ */ r(o, { sx: { display: "flex", flexDirection: "column" }, children: [ /* @__PURE__ */ r( o, { sx: { backgroundColor: "primary.800", p: "50px 50px 20px 50px" }, children: [ /* @__PURE__ */ r( o, { sx: { display: "flex", flexWrap: "wrap", justifyContent: "space-between", rowGap: "50px" }, children: [ /* @__PURE__ */ r(o, { sx: { display: "flex", flexDirection: "column" }, children: [ /* @__PURE__ */ e(R, { color: "white" }), /* @__PURE__ */ e( t, { variant: "body1Italic", sx: { color: "primary.200", fontSize: "13px", mb: "25px" }, children: "Powered by Sage Bionetworks" } ), !i && /* @__PURE__ */ e( t, { variant: "h5", sx: { color: "white", fontSize: "32px", lineHeight: "46px", fontWeight: 400, mb: "30px" }, children: "Sign up for Synapse today" } ), !i && /* @__PURE__ */ r(o, { sx: { display: "flex", columnGap: "20px" }, children: [ /* @__PURE__ */ e( s, { variant: "outlined", color: "lightPrimary", onClick: () => { f("/LoginPlace:0"); }, children: "Login to Synapse" } ), /* @__PURE__ */ e( s, { variant: "contained", color: "lightPrimary", href: d.toString(), children: "Register Now" } ) ] }) ] }), /* @__PURE__ */ e(o, { children: /* @__PURE__ */ r( o, { sx: { display: "flex", columnGap: "60px", rowGap: "40px", flexWrap: "wrap" }, children: [ /* @__PURE__ */ e( p, { category: "Synapse", synapseLinks: [ { text: "Contact Us", props: { href: "https://sagebionetworks.jira.com/servicedesk/customer/portals" } }, { text: "Plans", props: { href: B, target: "_self" } }, { text: "Data Portals", props: { href: g.toString() } }, { text: "Donate", props: { href: "https://sagebionetworks.org/donate" } } ] } ), /* @__PURE__ */ e( p, { category: "Resources", synapseLinks: [ { text: "Blog", props: { href: "https://blog.synapse.org/" } }, { text: "FAQs", props: { href: "https://help.synapse.org/docs/FAQ.2047967233.html" } }, { text: "Documentation", props: { href: "https://help.synapse.org/docs/" } }, { text: "Python Client", props: { href: "https://python-docs.synapse.org/en/stable/" } } ] } ), /* @__PURE__ */ e( p, { category: "Sage Bionetworks", synapseLinks: [ { text: "Sage Home Page", props: { href: "https://sagebionetworks.org/" } }, { text: "Report Violations", props: { href: "https://sagebionetworks.jira.com/servicedesk/customer/portal/20" } }, { text: "Trust Center", props: { href: "https://sagebionetworks.org/trust-center" } } ] } ) ] } ) }) ] } ), /* @__PURE__ */ r( o, { sx: { display: "flex", flexWrap: "wrap", justifyContent: { xs: "center", md: "space-between" }, alignItems: "center", mt: "60px", rowGap: "40px" }, children: [ /* @__PURE__ */ r( o, { sx: { display: "flex", columnGap: "20px", alignItems: "center", flexWrap: "wrap", justifyContent: { xs: "center", md: void 0 } }, children: [ /* @__PURE__ */ e(C, { textColor: "white", width: 285 }), /* @__PURE__ */ r( t, { variant: "body1", sx: { color: "primary.200", fontSize: "18px" }, children: [ "© Sage Bionetworks ", j ] } ) ] } ), /* @__PURE__ */ r( o, { sx: { display: "flex", columnGap: "15px", svg: { "&:hover": { stroke: "rgba(255, 255, 255, .4)" // fill: 'rgba(245, 246, 241, .05)', //uncomment if extra emphasis is needed } } }, children: [ /* @__PURE__ */ e( "a", { href: "https://github.com/Sage-Bionetworks", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ e(y, {}) } ), /* @__PURE__ */ e( "a", { href: "https://twitter.com/sagebio", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ e(k, {}) } ), /* @__PURE__ */ e( "a", { href: "https://www.linkedin.com/company/sage-bionetworks", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ e(b, {}) } ), /* @__PURE__ */ e( "a", { href: "https://www.facebook.com/sagebionetworks/", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ e(w, {}) } ), /* @__PURE__ */ e( "a", { href: "https://www.instagram.com/sagebionetworks/", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ e(u, {}) } ), /* @__PURE__ */ e( "a", { href: "https://www.youtube.com/channel/UCiWTMRdO82wNq6o8JOs3WzQ", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ e(S, {}) } ) ] } ) ] } ) ] } ), /* @__PURE__ */ r( o, { sx: { display: "flex", flexWrap: "wrap", justifyContent: "space-between", backgroundColor: "#121B23", alignItems: "center", p: "15px 50px" }, children: [ /* @__PURE__ */ r( o, { sx: { display: "flex", flexWrap: "wrap", columnGap: "40px", rowGap: "0px", color: "primary.300" }, children: [ /* @__PURE__ */ r( t, { variant: "body1", sx: { fontSize: "14px" }, children: [ "portal: ", l ] } ), /* @__PURE__ */ r( t, { variant: "body1", sx: { fontSize: "14px" }, children: [ "synapse-react-client: ", c ] } ), /* @__PURE__ */ r( t, { variant: "body1", sx: { fontSize: "14px" }, children: [ "repo: ", m ] } ), n && /* @__PURE__ */ r(L, { direction: "row", alignItems: "center", children: [ /* @__PURE__ */ r( t, { variant: "body1", sx: { fontSize: "14px" }, children: [ "realm: ", n.name ] } ), n.id !== v && /* @__PURE__ */ e( F, { title: `Reset Realm${i ? " (will log you out)" : ""}`, children: /* @__PURE__ */ e( z, { size: "small", sx: { color: "currentcolor" }, onClick: () => { h(); }, children: /* @__PURE__ */ e(W, { sx: { fontSize: "inherit" } }) } ) } ) ] }) ] } ), /* @__PURE__ */ e(P, { onExperimentalModeToggle: x }) ] } ) ] }); } export { ve as SynapseFooter, ve as default }; //# sourceMappingURL=SynapseFooter.js.map