[Feature] Integrate DOI Links, Handle Cycles in Pathway Viz (#407)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#407
This commit is contained in:
2026-06-03 06:00:38 +12:00
parent 868bbf5c05
commit 14cfc1e4d7
7 changed files with 169 additions and 19 deletions

View File

@ -293,6 +293,34 @@ document.addEventListener("alpine:init", () => {
}),
);
// PubMed link widget
Alpine.data(
"doiWidget",
(fieldName, data, schema, uiSchema, mode, debugErrors, context = null) => ({
...baseWidget(
fieldName,
data,
schema,
uiSchema,
mode,
debugErrors,
context,
),
get value() {
return this.data[this.fieldName] || "";
},
set value(v) {
this.data[this.fieldName] = v;
},
get doiUrl() {
return this.value
? `https://dx.doi.org/${this.value}`
: null;
},
}),
);
// Compound link widget
Alpine.data(
"compoundWidget",