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

174 lines (173 loc) 6.35 kB
import { jsx as r, jsxs as t, Fragment as S } from "react/jsx-runtime"; import { Box as d } from "@mui/material"; import { SmartLink as D } from "./SmartLink/SmartLink.js"; import { forwardRef as C } from "react"; import T from "./row_renderers/utils/CardFooter.js"; import "../assets/icons/chart2.svg.js"; import "../assets/icons/Data2.svg.js"; import "../assets/icons/DNA_Two.svg.js"; import "../assets/icons/file.svg.js"; import "../assets/icons/institution.svg.js"; import "../assets/icons/mouse.svg.js"; import "../assets/icons/organizations.svg.js"; import "../assets/icons/person.svg.js"; import "../assets/icons/study-active.svg.js"; import "../assets/icons/study-complete.svg.js"; import "../assets/icons/translational.svg.js"; import "../assets/icons/tree_horizontal.svg.js"; import "../assets/icons/standardDataModel.svg.js"; import "../assets/icons/Challenge.svg.js"; import "@mui/material/SvgIcon"; import "../utils/SynapseConstants.js"; import "../assets/ArcusBioIcon.svg.js"; import "../assets/icons/AccessPending.svg.js"; import "../assets/icons/AccessPendingCloud.svg.js"; import "../assets/icons/FileWithShield.svg.js"; import "../assets/icons/MultiFile.svg.js"; import "../assets/icons/UnpackagableFile.svg.js"; import "../assets/icons/bioChemicalPhysical.svg.js"; import "../assets/icons/computationalTool.svg.js"; import "../assets/icons/dataReuse.svg.js"; import "../assets/icons/inSilicoModel.svg.js"; import "../assets/icons/modelSystem.svg.js"; import "../assets/mui_components/PackagableFile.svg.js"; import "../assets/icons/spatialProfiling.svg.js"; import "@mui/icons-material"; import { CollapsibleDescription as H } from "./GenericCard/CollapsibleDescription.js"; import L from "./HeaderCard/HeaderCardV2.js"; import w from "./SustainabilityScorecard/SustainabilityScorecard.js"; import { useDocumentMetadata as k } from "../utils/context/DocumentMetadataContext.js"; const B = C(function(e, o) { const { type: a, title: n, subTitle: s = "", description: l, values: m, secondaryLabelLimit: g, isAlignToLeftNav: x, descriptionConfig: c, href: p, target: y, icon: N, cardTopContent: f, cardTopButtons: v, sustainabilityScorecard: i, sx: b } = e, u = !!i, R = { ...c, showFullDescriptionByDefault: c?.showFullDescriptionByDefault ?? !0 }; return k({ title: n, description: l || s || void 0, priority: 100 }), /* @__PURE__ */ r( d, { ref: o, className: `SRC-portalCard SRC-portalCardHeader ${x ? "isAlignToLeftNav" : ""}`, sx: b, children: /* @__PURE__ */ t("div", { className: "container-fluid container-full-width", children: [ /* @__PURE__ */ r( d, { sx: { display: "flex", gap: "10px", float: "right" }, children: v } ), /* @__PURE__ */ r("div", { className: "row", children: /* @__PURE__ */ r("div", { className: "col-md-offset-1 col-md-10", children: /* @__PURE__ */ t("div", { className: "SRC-portalCardMain", children: [ !u && N, /* @__PURE__ */ t( d, { sx: { width: "100%", ...u && { display: "flex", flexDirection: { xs: "column", sm: "row" } } }, children: [ /* @__PURE__ */ t("div", { className: "SRC-cardContent", style: { marginLeft: "15px" }, children: [ /* @__PURE__ */ r("div", { className: "SRC-type", children: a }), /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("h3", { className: "SRC-boldText", style: { margin: "none" }, children: p ? /* @__PURE__ */ r( D, { href: p ?? "", className: "highlight-link", target: y, children: n } ) : /* @__PURE__ */ r("span", { children: n }) }) }), s && /* @__PURE__ */ t("div", { className: "SRC-author", children: [ " ", s, " " ] }), /* @__PURE__ */ r( H, { description: l, descriptionSubTitle: "", descriptionConfig: R } ), i && /* @__PURE__ */ r( w, { metricsConfig: i.metricsConfig, searchParamKey: i.searchParamKey, filterColumn: i.filterColumn, scoreDescriptorColumnName: i.scoreDescriptorColumnName, queryRequest: i.queryRequest, sustainabilityReportLink: i.sustainabilityReportLink, sx: { background: "rgba(0, 0, 0, 0.10)", marginTop: "30px" } } ) ] }), (m || f) && /* @__PURE__ */ t(S, { children: [ /* @__PURE__ */ r( "div", { style: { borderTop: "1px solid rgba(26, 28, 41, 0.2)", marginTop: "15px", paddingTop: "5px" } } ), /* @__PURE__ */ t("div", { className: "SRC-cardContent", children: [ f, m && /* @__PURE__ */ r( T, { isHeader: !0, secondaryLabelLimit: g, values: m } ) ] }) ] }) ] } ) ] }) }) }) ] }) } ); }), xr = C(function(e, o) { const { headerCardVariant: a = "HeaderCard" } = e; return a === "HeaderCardV2" ? /* @__PURE__ */ r(L, { ...e, ref: o }) : /* @__PURE__ */ r(B, { ...e, ref: o }); }); export { xr as default }; //# sourceMappingURL=HeaderCard.js.map