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

36 lines (35 loc) 1.4 kB
import { jsxs as i, Fragment as o, jsx as r } from "react/jsx-runtime"; import { isVersionableEntityType as m, convertToEntityType as s } from "../../utils/functions/EntityTypeUtils.js"; import { PRODUCTION_ENDPOINT_CONFIG as c } from "../../utils/functions/getEndpoint.js"; import { Tooltip as l, Link as p } from "@mui/material"; import { useMemo as v } from "react"; import { ProvenanceEntityIcon as y } from "./ProvenanceEntityIcon.js"; const u = (e) => { const t = e.versionNumber ? `.${e.versionNumber}` : "", n = `${e.id}${t}`; return v( () => /* @__PURE__ */ i(o, { children: [ /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(y, { entityHeader: e }) }), /* @__PURE__ */ i(o, { children: [ /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(l, { title: e.name, placement: "top", enterNextDelay: 300, children: /* @__PURE__ */ r( p, { href: `${c.PORTAL}Synapse:${n}`, children: e.name } ) }) }), m(s(e.type)) && /* @__PURE__ */ i("div", { children: [ /* @__PURE__ */ i("div", { children: [ "v.", e.versionNumber ] }), !e.isLatestVersion && /* @__PURE__ */ r("div", { children: "(old version)" }) ] }) ] }) ] }), [e, n] ); }; export { u as EntityNodeLabel }; //# sourceMappingURL=EntityNodeLabel.js.map