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

200 lines (199 loc) 6.38 kB
import { jsx as r, jsxs as t } from "react/jsx-runtime"; import { GenericCardTitle as H } from "./GenericCardTitle.js"; import { Box as l, Stack as I } from "@mui/material"; import { forwardRef as B } from "react"; import F from "../HeaderCard.js"; import G 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 { SmartLink as _ } from "../SmartLink/SmartLink.js"; import { FileHandleLink as j } from "../widgets/FileHandleLink.js"; import { CollapsibleDescription as E } from "./CollapsibleDescription.js"; const M = [], br = B(function(R, c) { const { icon: f, type: h, title: n, titleLinkConfiguration: o, titleAsFileHandleLinkConfiguration: a, subtitle: s, description: C, descriptionSubTitle: S = "", descriptionConfig: x, cardTopContent: g, cardTopButtons: p, isHeader: m = !1, headerCardVariant: T, useStylesForDisplayedImage: u = !1, labels: d = M, secondaryLabelLimit: v, ctaLinkConfig: i, renderedIconList: L, sustainabilityScorecard: b, cardTypeAdornment: N, titleAreaRightContent: y, charCountCutoff: w } = R, A = d.length > 0, D = { // undefined, take default value from class marginTop: m ? "0px" : void 0, marginBottom: m ? "0px" : void 0, paddingBottom: A || u ? void 0 : "15px" }; return m ? /* @__PURE__ */ r( F, { ref: c, headerCardVariant: T, descriptionConfig: x, charCountCutoff: w, title: n, subTitle: s, description: C, type: h, icon: f, values: d, href: o?.href, target: o?.target, ctaLinkConfig: i, isAlignToLeftNav: !0, secondaryLabelLimit: v, cardTopButtons: p, cardTopContent: g, sustainabilityScorecard: b } ) : /* @__PURE__ */ t("div", { style: D, ref: c, className: "SRC-portalCard", children: [ /* @__PURE__ */ t("div", { className: "SRC-portalCardMain", children: [ f, /* @__PURE__ */ t("div", { className: "SRC-cardContent", children: [ p && /* @__PURE__ */ r( l, { sx: { position: "absolute", right: "24px", display: "flex", float: "right", flexDirection: "row", gap: "10px" }, children: p } ), /* @__PURE__ */ t( I, { sx: { flexDirection: "row", alignItems: "center", gap: "10px" }, children: [ /* @__PURE__ */ r("div", { className: "SRC-type", children: h }), N ] } ), L, /* @__PURE__ */ t(l, { className: "SRC-cardTitleArea", children: [ /* @__PURE__ */ t(l, { sx: { flex: 1, minWidth: 0 }, children: [ /* @__PURE__ */ r("div", { children: /* @__PURE__ */ t( "h3", { className: "SRC-boldText SRC-blackText", style: { margin: "none" }, children: [ !a && /* @__PURE__ */ r( H, { title: n, href: o?.href, target: o?.target } ), a && /* @__PURE__ */ r( j, { fileHandleAssociation: a.fileHandleAssociation, showDownloadIcon: a.showDownloadIcon, displayValue: n } ) ] } ) }), s && /* @__PURE__ */ r("div", { className: "SRC-author", children: s }), /* @__PURE__ */ r( E, { description: C, descriptionSubTitle: S, descriptionConfig: x } ), i && /* @__PURE__ */ r( l, { sx: { mt: "20px", display: "flex", gap: 2, flexWrap: "wrap" }, children: (Array.isArray(i) ? i : [i]).map( (e, k) => e.text && e.href && /* @__PURE__ */ r( _, { href: e.href, target: e.target, children: e.text }, k ) ) } ) ] }), y && /* @__PURE__ */ r("div", { className: "SRC-cardTitleAreaDetails", children: y }) ] }) ] }) ] }), A && /* @__PURE__ */ r( G, { isHeader: !1, secondaryLabelLimit: v, values: d, className: u ? void 0 : "hasIcon", cardTopContent: g } ) ] }); }); export { br as GenericCard, br as default }; //# sourceMappingURL=GenericCard.js.map