UNPKG

taxonium-component

Version:

React component for exploring large phylogenetic trees in the browser

41 lines (40 loc) 1.91 kB
import { jsx as t, jsxs as i, Fragment as d } from "react/jsx-runtime"; import { o as n, a5 as g, a6 as a, a7 as s, u as p, m as u, a as m } from "./JBrowsePanel-uJIA-L6s.js"; import { A as h } from "./Arcs-D2VlVqb0.js"; import { lazy as f } from "react"; import { R as k, a as x } from "./Report-vmZncI_G.js"; const b = f(() => import("./ErrorMessageStackTraceDialog-DJjj_Xl3.js").then((e) => e.E)), B = u()((e) => ({ loading: { backgroundColor: e.palette.background.default, backgroundImage: `repeating-linear-gradient(45deg, transparent, transparent 5px, ${e.palette.action.disabledBackground} 5px, ${e.palette.action.disabledBackground} 10px)`, position: "absolute", bottom: 0, height: 50, width: 300, right: 0, pointerEvents: "none", textAlign: "center" } })), y = n(function({ model: e, children: o }) { const { error: r, regionTooLarge: c } = e; return r ? t(g, { message: `${r}`, severity: "error", action: i(d, { children: [t(a, { title: "Reload", children: t(s, { "data-testid": "reload_button", onClick: () => { e.reload(); }, children: t(k, {}) }) }), t(a, { title: "Show stack trace", children: t(s, { onClick: () => { p.getSession(e).queueDialog((l) => [ b, { onClose: l, error: e.error } ]); }, children: t(x, {}) }) })] }) }) : c ? e.regionCannotBeRendered() : t(C, { model: e, children: o }); }), C = n(function({ model: e, children: o }) { const { loading: r } = e; return i("div", { children: [o, r ? t(E, { model: e }) : null] }); }), E = n(function({ model: e }) { const { classes: o } = B(), { message: r } = e; return t("div", { className: o.loading, children: t(m.LoadingEllipses, { message: r }) }); }), I = n(function({ model: e, exportSVG: o }) { return t(y, { model: e, children: t(h, { model: e, exportSVG: o }) }); }); export { I as default }; //# sourceMappingURL=ReactComponent-JmyXYmlJ.js.map