synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
78 lines (77 loc) • 1.38 kB
JavaScript
import { jsx as t } from "react/jsx-runtime";
import { convertToEntityType as l } from "../../utils/functions/EntityTypeUtils.js";
import { EntityType as i } from "@sage-bionetworks/synapse-client";
import { EntityTypeIcon as r } from "../EntityIcon.js";
import p from "../IconSvg/IconSvg.js";
const d = /* @__PURE__ */ new Set([
".awk",
".bat",
".btm",
".c",
".cmd",
".cpp",
".cxx",
".def",
".dlg",
".dpc",
".dpj",
".dtd",
".h",
".hdl",
".hpp",
".hrc",
".html",
".hxx",
".inc",
".ini",
".inl",
".ins",
".ipy",
".java",
".js",
".jsp",
".l",
".lgt",
".ll",
".par",
".pl",
".py",
".r",
".rc",
".rdb",
".res",
".s",
".sbl",
".scp",
".sh",
".sql",
".src",
".srs",
".xml",
".xrb",
".y",
".yaml",
".yxx",
".cwl",
".wdl",
".json"
]), h = (s) => {
const { entityHeader: e } = s;
if (e) {
const n = l(e?.type);
if (n == i.file) {
const o = e.name.lastIndexOf(".");
if (o > -1) {
const c = e.name.slice(o);
if (d.has(c.toLowerCase()))
return /* @__PURE__ */ t(p, { icon: "code" });
}
} else
return /* @__PURE__ */ t(r, { type: n, includeTooltip: !1 });
}
return /* @__PURE__ */ t(r, { type: i.file, includeTooltip: !1 });
};
export {
h as ProvenanceEntityIcon
};
//# sourceMappingURL=ProvenanceEntityIcon.js.map