@ts4nfdi/terminology-service-suite 6.12.4 → 6.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.es.js +161 -161
- package/dist/esm/index.es.js.map +1 -1
- package/dist/server/index.es.js +4 -4
- package/dist/server/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.es.js
CHANGED
|
@@ -1129,9 +1129,9 @@ class $r extends ii {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
function xe(e) {
|
|
1131
1131
|
let t;
|
|
1132
|
-
if (e._embedded !== void 0 || e.numberOfTerms !== void 0)
|
|
1132
|
+
if (e._embedded !== void 0 || e.numberOfTerms !== void 0 || e.config !== void 0)
|
|
1133
1133
|
t = !0;
|
|
1134
|
-
else if (e.elements !== void 0 || e.numberOfClasses !== void 0)
|
|
1134
|
+
else if (e.elements !== void 0 || e.numberOfClasses !== void 0 || e.config === void 0)
|
|
1135
1135
|
t = !1;
|
|
1136
1136
|
else
|
|
1137
1137
|
throw Error(
|
|
@@ -1142,8 +1142,8 @@ function xe(e) {
|
|
|
1142
1142
|
);
|
|
1143
1143
|
let i;
|
|
1144
1144
|
if (t)
|
|
1145
|
-
e._embedded === void 0 ? i = "ontology" : e._embedded.terms !== void 0 ? i = "term" : e._embedded.properties !== void 0 ? i = "property" : e._embedded.individuals !== void 0 && (i = "individual");
|
|
1146
|
-
else if (e.elements === void 0)
|
|
1145
|
+
e._embedded == null || e._embedded === void 0 ? i = "ontology" : e._embedded.terms !== void 0 ? i = "term" : e._embedded.properties !== void 0 ? i = "property" : e._embedded.individuals !== void 0 && (i = "individual");
|
|
1146
|
+
else if (e.elements == null || e.elements === void 0)
|
|
1147
1147
|
i = "ontology";
|
|
1148
1148
|
else {
|
|
1149
1149
|
if (e.elements[0] === void 0) throw Error("Empty response.");
|
|
@@ -1945,7 +1945,7 @@ class It extends ei {
|
|
|
1945
1945
|
s = s.concat(
|
|
1946
1946
|
n._embedded.ontologies.map((c) => xe(c))
|
|
1947
1947
|
), a += 1;
|
|
1948
|
-
} while (a < n.page.totalPages);
|
|
1948
|
+
} while (n.page && n.page.totalPages != null && a < n.page.totalPages);
|
|
1949
1949
|
return new _r(s);
|
|
1950
1950
|
} else {
|
|
1951
1951
|
do {
|
|
@@ -1960,7 +1960,7 @@ class It extends ei {
|
|
|
1960
1960
|
s = s.concat(
|
|
1961
1961
|
n.elements.map((c) => xe(c))
|
|
1962
1962
|
), a += 1;
|
|
1963
|
-
} while (a < n.totalPages);
|
|
1963
|
+
} while (n.page && n.page.totalPages != null && a < n.page.totalPages);
|
|
1964
1964
|
return new zr(s);
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
@@ -3404,20 +3404,20 @@ function tn(e) {
|
|
|
3404
3404
|
Ee(() => {
|
|
3405
3405
|
!a && l ? (z(l), L(void 0)) : (z(a), L(l));
|
|
3406
3406
|
}, [a, l]);
|
|
3407
|
-
function k(
|
|
3408
|
-
let m =
|
|
3409
|
-
return m.includes(
|
|
3407
|
+
function k(v) {
|
|
3408
|
+
let m = v.entityData.definedBy || [];
|
|
3409
|
+
return m.includes(v.ontologyId) && (m = []), /* @__PURE__ */ h("span", { style: { position: "relative", left: "16px", lineHeight: "20px" }, children: [
|
|
3410
3410
|
/* @__PURE__ */ h(
|
|
3411
3411
|
"span",
|
|
3412
3412
|
{
|
|
3413
|
-
className:
|
|
3414
|
-
style: { background: Nr(
|
|
3413
|
+
className: v.highlightColor ? "highlight" : void 0,
|
|
3414
|
+
style: { background: Nr(v.highlightColor, 0.2) },
|
|
3415
3415
|
children: [
|
|
3416
|
-
|
|
3416
|
+
v.childRelationToParent == "http://purl.obolibrary.org/obo/BFO_0000050" && /* @__PURE__ */ h(g, { children: [
|
|
3417
3417
|
/* @__PURE__ */ r("span", { className: "surroundCircle", children: " P " }),
|
|
3418
3418
|
" "
|
|
3419
3419
|
] }),
|
|
3420
|
-
|
|
3420
|
+
v.childRelationToParent == "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" && /* @__PURE__ */ h(g, { children: [
|
|
3421
3421
|
/* @__PURE__ */ r("span", { className: "surroundCircle", children: "I" }),
|
|
3422
3422
|
" "
|
|
3423
3423
|
] }),
|
|
@@ -3425,10 +3425,10 @@ function tn(e) {
|
|
|
3425
3425
|
"a",
|
|
3426
3426
|
{
|
|
3427
3427
|
onClick: () => {
|
|
3428
|
-
typeof
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3428
|
+
typeof v.onNavigateToEntity == "function" && v.onNavigateToEntity(
|
|
3429
|
+
v.ontologyId,
|
|
3430
|
+
v.entityType || "",
|
|
3431
|
+
v.entityData
|
|
3432
3432
|
);
|
|
3433
3433
|
},
|
|
3434
3434
|
style: {
|
|
@@ -3437,47 +3437,47 @@ function tn(e) {
|
|
|
3437
3437
|
// a little lighter than black
|
|
3438
3438
|
cursor: "pointer"
|
|
3439
3439
|
},
|
|
3440
|
-
children: /* @__PURE__ */ r("span", { style: { color:
|
|
3440
|
+
children: /* @__PURE__ */ r("span", { style: { color: v.entityData.color }, children: v.entityData.label || v.entityData.iri })
|
|
3441
3441
|
}
|
|
3442
3442
|
)
|
|
3443
3443
|
]
|
|
3444
3444
|
}
|
|
3445
3445
|
),
|
|
3446
3446
|
/* @__PURE__ */ h("span", { children: [
|
|
3447
|
-
m.length > 0 && /* @__PURE__ */ r(g, { children: m.map((
|
|
3447
|
+
m.length > 0 && /* @__PURE__ */ r(g, { children: m.map((S) => /* @__PURE__ */ h("span", { children: [
|
|
3448
3448
|
" ",
|
|
3449
3449
|
/* @__PURE__ */ r(
|
|
3450
3450
|
"button",
|
|
3451
3451
|
{
|
|
3452
3452
|
onClick: () => {
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3453
|
+
v.onNavigateToOntology && v.onNavigateToOntology(
|
|
3454
|
+
S,
|
|
3455
|
+
v.entityType || "",
|
|
3456
|
+
v.entityData
|
|
3457
3457
|
);
|
|
3458
3458
|
},
|
|
3459
3459
|
children: /* @__PURE__ */ r("span", { className: "ontology-badge", children: /* @__PURE__ */ r(
|
|
3460
3460
|
kt,
|
|
3461
3461
|
{
|
|
3462
|
-
ontologyId:
|
|
3463
|
-
onNavigateToOntology:
|
|
3462
|
+
ontologyId: S.toUpperCase(),
|
|
3463
|
+
onNavigateToOntology: v.onNavigateToOntology
|
|
3464
3464
|
}
|
|
3465
3465
|
) })
|
|
3466
3466
|
}
|
|
3467
3467
|
)
|
|
3468
3468
|
] }, ee())) }),
|
|
3469
3469
|
// number of descendants
|
|
3470
|
-
|
|
3470
|
+
v.entityData.numDescendants != null && v.entityData.numDescendants > 0 && /* @__PURE__ */ h("span", { style: { color: "gray" }, children: [
|
|
3471
3471
|
" ",
|
|
3472
3472
|
"(",
|
|
3473
|
-
|
|
3473
|
+
v.entityData.numDescendants.toLocaleString(),
|
|
3474
3474
|
")"
|
|
3475
3475
|
] })
|
|
3476
3476
|
] })
|
|
3477
3477
|
] });
|
|
3478
3478
|
}
|
|
3479
3479
|
const [, I] = rr(
|
|
3480
|
-
(
|
|
3480
|
+
(v) => v + 1 % Number.MAX_SAFE_INTEGER,
|
|
3481
3481
|
0
|
|
3482
3482
|
), [x, J] = ht.useState(!1), [ue, ie] = ht.useState(!1), re = Ke(() => {
|
|
3483
3483
|
switch (i) {
|
|
@@ -3545,18 +3545,18 @@ function tn(e) {
|
|
|
3545
3545
|
refetchOnWindowFocus: !1
|
|
3546
3546
|
}
|
|
3547
3547
|
), q = Ni(
|
|
3548
|
-
(
|
|
3548
|
+
(v) => {
|
|
3549
3549
|
if (!(V instanceof ot))
|
|
3550
3550
|
throw Error(
|
|
3551
3551
|
"Hierarchy object was undefined while trying to expand a tree node. This should never happen."
|
|
3552
3552
|
);
|
|
3553
|
-
V.entityType && je(V.entityType) || (
|
|
3554
|
-
|
|
3555
|
-
})) : (I(), V.closeNode(
|
|
3553
|
+
V.entityType && je(V.entityType) || (v.expanded = !v.expanded, v.expanded ? (v.loading = !0, I(), V.fetchInformationForExpansion(v).then(() => {
|
|
3554
|
+
v.loading = !1, I();
|
|
3555
|
+
})) : (I(), V.closeNode(v)));
|
|
3556
3556
|
},
|
|
3557
3557
|
[V]
|
|
3558
3558
|
);
|
|
3559
|
-
function de(
|
|
3559
|
+
function de(v, m, S) {
|
|
3560
3560
|
return /* @__PURE__ */ h("div", { children: [
|
|
3561
3561
|
/* @__PURE__ */ h("div", { style: { position: "relative" }, children: [
|
|
3562
3562
|
/* @__PURE__ */ r(
|
|
@@ -3598,7 +3598,7 @@ function tn(e) {
|
|
|
3598
3598
|
/* @__PURE__ */ r(
|
|
3599
3599
|
"div",
|
|
3600
3600
|
{
|
|
3601
|
-
className:
|
|
3601
|
+
className: S ? "lineAfterNodeInlet" : ""
|
|
3602
3602
|
}
|
|
3603
3603
|
),
|
|
3604
3604
|
/* @__PURE__ */ r(
|
|
@@ -3606,8 +3606,8 @@ function tn(e) {
|
|
|
3606
3606
|
{
|
|
3607
3607
|
entityData: m.entityData,
|
|
3608
3608
|
childRelationToParent: m.childRelationToParent,
|
|
3609
|
-
ontologyId:
|
|
3610
|
-
entityType:
|
|
3609
|
+
ontologyId: v.ontologyId,
|
|
3610
|
+
entityType: v.entityType,
|
|
3611
3611
|
onNavigateToEntity: typeof n == "function" ? n : () => {
|
|
3612
3612
|
},
|
|
3613
3613
|
onNavigateToOntology: typeof s == "function" ? s : () => {
|
|
@@ -3624,10 +3624,10 @@ function tn(e) {
|
|
|
3624
3624
|
) : m.loadedChildren.map((Q, P) => /* @__PURE__ */ r(
|
|
3625
3625
|
"div",
|
|
3626
3626
|
{
|
|
3627
|
-
className:
|
|
3627
|
+
className: S ? "outerLine" : "",
|
|
3628
3628
|
style: { paddingLeft: "1rem" },
|
|
3629
3629
|
children: de(
|
|
3630
|
-
|
|
3630
|
+
v,
|
|
3631
3631
|
Q,
|
|
3632
3632
|
P < m.loadedChildren.length - 1
|
|
3633
3633
|
)
|
|
@@ -3681,7 +3681,7 @@ function tn(e) {
|
|
|
3681
3681
|
{
|
|
3682
3682
|
buttonContent: ue ? "Hide Legend" : "Show Legend",
|
|
3683
3683
|
id: "",
|
|
3684
|
-
onToggle: (
|
|
3684
|
+
onToggle: (v) => ie(v),
|
|
3685
3685
|
children: /* @__PURE__ */ h(Y, { style: { paddingLeft: ".3em" }, children: [
|
|
3686
3686
|
/* @__PURE__ */ r(
|
|
3687
3687
|
rt,
|
|
@@ -3738,9 +3738,9 @@ function tn(e) {
|
|
|
3738
3738
|
{
|
|
3739
3739
|
style: { whiteSpace: b ? "wrap" : "nowrap" },
|
|
3740
3740
|
children: V.roots.map(
|
|
3741
|
-
(
|
|
3741
|
+
(v, m) => de(
|
|
3742
3742
|
V,
|
|
3743
|
-
|
|
3743
|
+
v,
|
|
3744
3744
|
m < V.roots.length - 1
|
|
3745
3745
|
)
|
|
3746
3746
|
)
|
|
@@ -5213,7 +5213,7 @@ function Tn(e) {
|
|
|
5213
5213
|
} = e, [N, O] = $(i), [b, C] = $(!0), [p, R] = $(!1), [f, T] = $(!1), [E, z] = $(!1), [F, L] = $(Math.floor(Math.random() * 100)), [k, I] = $({
|
|
5214
5214
|
nodes: [],
|
|
5215
5215
|
edges: []
|
|
5216
|
-
}), [x, J] = $(""), [ue, ie] = $({ bgColor: "", color: "" }), [re, V] = $(!1), [G, q] = $(!1), [de, ge] = $(!1), [te, se] = $(e.targetIri ?? ""), [Le,
|
|
5216
|
+
}), [x, J] = $(""), [ue, ie] = $({ bgColor: "", color: "" }), [re, V] = $(!1), [G, q] = $(!1), [de, ge] = $(!1), [te, se] = $(e.targetIri ?? ""), [Le, v] = $(""), [m, S] = $(""), Q = s || "ts4nfdi-graph-style", P = !l || l === "undefined" ? "is a" : l, X = typeof c == "function" && !c.name.includes("actionHandler"), Ie = "#139ec4", fe = "#708238", Oe = "#00a86b", _e = "#ff991c", H = "white", { data: U, isLoading: Ae, isError: Te, error: He } = le(
|
|
5217
5217
|
["termGraph", t, o, n, a, f, F],
|
|
5218
5218
|
async () => {
|
|
5219
5219
|
let A = i;
|
|
@@ -5305,7 +5305,7 @@ function Tn(e) {
|
|
|
5305
5305
|
A = A,
|
|
5306
5306
|
fe,
|
|
5307
5307
|
H
|
|
5308
|
-
)), ae.current.get(M.id) ? B && M.id !== i && M.id !== te && (M = new $t(A = A, _e), ae.current.remove(M.id), Tt.current.set(M.id ?? "", M.color.background), ae.current.add(M)) : (M.id === i ? (
|
|
5308
|
+
)), ae.current.get(M.id) ? B && M.id !== i && M.id !== te && (M = new $t(A = A, _e), ae.current.remove(M.id), Tt.current.set(M.id ?? "", M.color.background), ae.current.add(M)) : (M.id === i ? (v(M.label ?? ""), M.color.background = Ie, M.font.color = H) : te && M.id === te ? (S(M.label ?? ""), M.color.background = Oe, M.font.color = H) : Tt.current.get(M.id) ? M.color.background = Tt.current.get(M.id) : f && ue.bgColor && ue.bgColor !== Ie && (M.color.background = ue.bgColor, M.font.color = H), Tt.current.set(M.id ?? "", M.color.background), ae.current.add(M));
|
|
5309
5309
|
}
|
|
5310
5310
|
function it(A, B = P) {
|
|
5311
5311
|
var M;
|
|
@@ -6494,7 +6494,7 @@ function go(e) {
|
|
|
6494
6494
|
O ?? ""
|
|
6495
6495
|
), [z, F] = $(
|
|
6496
6496
|
[]
|
|
6497
|
-
), [L, k] = $([]), I = w || "ts4nfdi-autocomplete-style", [x, J] = $(!1), ue = (m,
|
|
6497
|
+
), [L, k] = $([]), I = w || "ts4nfdi-autocomplete-style", [x, J] = $(!1), ue = (m, S) => {
|
|
6498
6498
|
const { label: Q, value: P } = m, Ie = (/* @__PURE__ */ new Map([
|
|
6499
6499
|
["class", 8],
|
|
6500
6500
|
["individual", 4],
|
|
@@ -6529,7 +6529,7 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6529
6529
|
lineHeight: "1.2"
|
|
6530
6530
|
},
|
|
6531
6531
|
children: [
|
|
6532
|
-
/* @__PURE__ */ r(Ft, { search:
|
|
6532
|
+
/* @__PURE__ */ r(Ft, { search: S, children: P.label || P.ontology_name }),
|
|
6533
6533
|
!d && P.description && /* @__PURE__ */ r(
|
|
6534
6534
|
"span",
|
|
6535
6535
|
{
|
|
@@ -6550,7 +6550,7 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6550
6550
|
const Ae = P.synonyms ?? [], Te = Ln(
|
|
6551
6551
|
P.label,
|
|
6552
6552
|
Ae,
|
|
6553
|
-
|
|
6553
|
+
S
|
|
6554
6554
|
);
|
|
6555
6555
|
return /* @__PURE__ */ h("span", { title: "", className: I, children: [
|
|
6556
6556
|
/* @__PURE__ */ h(
|
|
@@ -6563,10 +6563,10 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6563
6563
|
},
|
|
6564
6564
|
children: [
|
|
6565
6565
|
/* @__PURE__ */ r(rt, { color: fe, children: /* @__PURE__ */ h("span", { children: [
|
|
6566
|
-
/* @__PURE__ */ r(Ft, { search:
|
|
6566
|
+
/* @__PURE__ */ r(Ft, { search: S, children: P.label }),
|
|
6567
6567
|
Te && /* @__PURE__ */ h(g, { children: [
|
|
6568
6568
|
" (",
|
|
6569
|
-
/* @__PURE__ */ r(Ft, { search:
|
|
6569
|
+
/* @__PURE__ */ r(Ft, { search: S, children: `SYN: ${Te || ""}` }),
|
|
6570
6570
|
")"
|
|
6571
6571
|
] })
|
|
6572
6572
|
] }) }),
|
|
@@ -6633,7 +6633,7 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6633
6633
|
}
|
|
6634
6634
|
};
|
|
6635
6635
|
}
|
|
6636
|
-
function V(m,
|
|
6636
|
+
function V(m, S) {
|
|
6637
6637
|
return {
|
|
6638
6638
|
label: o ? m.getLabel() : se(m),
|
|
6639
6639
|
key: `${m.getOntologyId()}::${m.getIri()}::${m.getType()}`,
|
|
@@ -6644,11 +6644,11 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6644
6644
|
type: m.getType(),
|
|
6645
6645
|
short_form: m.getShortForm(),
|
|
6646
6646
|
description: m.getDescription(),
|
|
6647
|
-
...
|
|
6647
|
+
...S
|
|
6648
6648
|
}
|
|
6649
6649
|
};
|
|
6650
6650
|
}
|
|
6651
|
-
async function G(m,
|
|
6651
|
+
async function G(m, S) {
|
|
6652
6652
|
try {
|
|
6653
6653
|
const Q = await R.getEntityObject(
|
|
6654
6654
|
m.iri,
|
|
@@ -6657,16 +6657,16 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6657
6657
|
i,
|
|
6658
6658
|
N
|
|
6659
6659
|
);
|
|
6660
|
-
|
|
6660
|
+
S.push(V(Q, m)), c && S.length > 1 && (S.length = 1);
|
|
6661
6661
|
} catch (Q) {
|
|
6662
|
-
m.label && n &&
|
|
6662
|
+
m.label && n && S.push(ie(m)), c && S.length > 1 && (S.length = 1), console.error(
|
|
6663
6663
|
"Error fetching data for option:",
|
|
6664
6664
|
m,
|
|
6665
6665
|
Q
|
|
6666
6666
|
);
|
|
6667
6667
|
}
|
|
6668
6668
|
}
|
|
6669
|
-
async function q(m,
|
|
6669
|
+
async function q(m, S) {
|
|
6670
6670
|
try {
|
|
6671
6671
|
const Q = await p.getSelectData(
|
|
6672
6672
|
{ query: m.iri },
|
|
@@ -6679,32 +6679,32 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6679
6679
|
!de(
|
|
6680
6680
|
Q,
|
|
6681
6681
|
m,
|
|
6682
|
-
|
|
6683
|
-
) && m.label && n &&
|
|
6682
|
+
S
|
|
6683
|
+
) && m.label && n && S.push(ie(m)), c && S.length > 1 && (S.length = 1);
|
|
6684
6684
|
} catch (Q) {
|
|
6685
|
-
m.label && n &&
|
|
6685
|
+
m.label && n && S.push(ie(m)), c && S.length > 1 && (S.length = 1), console.error(
|
|
6686
6686
|
"Error fetching data for option:",
|
|
6687
6687
|
m,
|
|
6688
6688
|
Q
|
|
6689
6689
|
);
|
|
6690
6690
|
}
|
|
6691
6691
|
}
|
|
6692
|
-
function de(m,
|
|
6692
|
+
function de(m, S, Q) {
|
|
6693
6693
|
let P = !1;
|
|
6694
6694
|
return m.properties.forEach((X) => {
|
|
6695
|
-
|
|
6695
|
+
S.iri === X.getIri() && (P = !0, Q.push(re(X)));
|
|
6696
6696
|
}), P;
|
|
6697
6697
|
}
|
|
6698
6698
|
const { isLoading: ge } = le(
|
|
6699
6699
|
["onMount", a],
|
|
6700
6700
|
async () => {
|
|
6701
6701
|
var Q, P;
|
|
6702
|
-
let m = [],
|
|
6702
|
+
let m = [], S = [...new Set(a ?? [])].filter(
|
|
6703
6703
|
(X) => n && X.label || X.iri
|
|
6704
6704
|
);
|
|
6705
|
-
if (
|
|
6706
|
-
c && (
|
|
6707
|
-
for (const X of
|
|
6705
|
+
if (S.length !== 0) {
|
|
6706
|
+
c && (S = [S[0]]);
|
|
6707
|
+
for (const X of S)
|
|
6708
6708
|
N ? (Q = X == null ? void 0 : X.iri) != null && Q.startsWith("http") ? await q(
|
|
6709
6709
|
X,
|
|
6710
6710
|
m
|
|
@@ -6727,38 +6727,38 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6727
6727
|
u
|
|
6728
6728
|
).then((m) => {
|
|
6729
6729
|
m && F(
|
|
6730
|
-
m.properties.map((
|
|
6731
|
-
if (
|
|
6732
|
-
const P =
|
|
6730
|
+
m.properties.map((S) => {
|
|
6731
|
+
if (S.getType() === "ontology") {
|
|
6732
|
+
const P = S.getLabel && S.getLabel() || S.getOntologyId && S.getOntologyId() || "Unknown ontology name";
|
|
6733
6733
|
return {
|
|
6734
6734
|
label: P,
|
|
6735
|
-
key: `${
|
|
6735
|
+
key: `${S.getOntologyId ? S.getOntologyId() : "unknown"}::${S.getIri ? S.getIri() : "unknown"}::unknown`,
|
|
6736
6736
|
value: {
|
|
6737
|
-
iri:
|
|
6737
|
+
iri: S.getIri ? S.getIri() : "",
|
|
6738
6738
|
label: P,
|
|
6739
|
-
ontology_name:
|
|
6739
|
+
ontology_name: S.getOntologyId ? S.getOntologyId() : "",
|
|
6740
6740
|
type: "ontology",
|
|
6741
6741
|
short_form: "",
|
|
6742
|
-
description:
|
|
6743
|
-
source:
|
|
6744
|
-
source_url:
|
|
6745
|
-
synonyms:
|
|
6742
|
+
description: S.getDescription ? S.getDescription() : "",
|
|
6743
|
+
source: S.getApiSourceName ? S.getApiSourceName() : "",
|
|
6744
|
+
source_url: S.getApiSourceEndpoint ? S.getApiSourceEndpoint() : "",
|
|
6745
|
+
synonyms: S.getSynonyms() ? S.getSynonyms() : []
|
|
6746
6746
|
}
|
|
6747
6747
|
};
|
|
6748
6748
|
} else
|
|
6749
6749
|
return {
|
|
6750
|
-
label: o ?
|
|
6751
|
-
key: `${
|
|
6750
|
+
label: o ? S.getLabel() : se(S),
|
|
6751
|
+
key: `${S.getOntologyId()}::${S.getIri()}::${S.getType()}`,
|
|
6752
6752
|
value: {
|
|
6753
|
-
iri:
|
|
6754
|
-
label:
|
|
6755
|
-
ontology_name:
|
|
6756
|
-
type:
|
|
6757
|
-
short_form:
|
|
6758
|
-
description:
|
|
6759
|
-
source:
|
|
6760
|
-
source_url:
|
|
6761
|
-
synonyms:
|
|
6753
|
+
iri: S.getIri(),
|
|
6754
|
+
label: S.getLabel(),
|
|
6755
|
+
ontology_name: S.getOntologyId(),
|
|
6756
|
+
type: S.getType(),
|
|
6757
|
+
short_form: S.getShortForm(),
|
|
6758
|
+
description: S.getDescription(),
|
|
6759
|
+
source: S.getApiSourceName(),
|
|
6760
|
+
source_url: S.getApiSourceEndpoint(),
|
|
6761
|
+
synonyms: S.getSynonyms() ? S.getSynonyms() : []
|
|
6762
6762
|
}
|
|
6763
6763
|
};
|
|
6764
6764
|
})
|
|
@@ -6771,16 +6771,16 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6771
6771
|
}, [te, ge, a, O]), Ee(() => {
|
|
6772
6772
|
let m = !0;
|
|
6773
6773
|
return m && s(
|
|
6774
|
-
L.map((
|
|
6774
|
+
L.map((S) => n && S.value.iri == "" ? {
|
|
6775
6775
|
iri: "",
|
|
6776
|
-
label:
|
|
6776
|
+
label: S.label,
|
|
6777
6777
|
ontology_name: "",
|
|
6778
6778
|
type: "",
|
|
6779
|
-
short_form:
|
|
6780
|
-
description:
|
|
6781
|
-
source:
|
|
6782
|
-
synonyms:
|
|
6783
|
-
} :
|
|
6779
|
+
short_form: S.value.short_form,
|
|
6780
|
+
description: S.value.description,
|
|
6781
|
+
source: S.value.source,
|
|
6782
|
+
synonyms: S.value.synonyms
|
|
6783
|
+
} : S.value.iri == "" ? {
|
|
6784
6784
|
iri: "",
|
|
6785
6785
|
label: "",
|
|
6786
6786
|
ontology_name: "",
|
|
@@ -6790,14 +6790,14 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6790
6790
|
source: "",
|
|
6791
6791
|
synonyms: []
|
|
6792
6792
|
} : {
|
|
6793
|
-
iri:
|
|
6794
|
-
label:
|
|
6795
|
-
ontology_name:
|
|
6796
|
-
type:
|
|
6797
|
-
short_form:
|
|
6798
|
-
description:
|
|
6799
|
-
source:
|
|
6800
|
-
synonyms:
|
|
6793
|
+
iri: S.value.iri,
|
|
6794
|
+
label: S.value.label,
|
|
6795
|
+
ontology_name: S.value.ontology_name,
|
|
6796
|
+
type: S.value.type,
|
|
6797
|
+
short_form: S.value.short_form,
|
|
6798
|
+
description: S.value.description,
|
|
6799
|
+
source: S.value.source,
|
|
6800
|
+
synonyms: S.value.synonyms
|
|
6801
6801
|
})
|
|
6802
6802
|
), () => {
|
|
6803
6803
|
m = !1;
|
|
@@ -6805,16 +6805,16 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6805
6805
|
}, [L]);
|
|
6806
6806
|
function se(m) {
|
|
6807
6807
|
var X;
|
|
6808
|
-
const
|
|
6809
|
-
if (
|
|
6808
|
+
const S = m == null ? void 0 : m.getLabel();
|
|
6809
|
+
if (S) return S;
|
|
6810
6810
|
const Q = (X = m == null ? void 0 : m.getOntologyId()) == null ? void 0 : X.toUpperCase(), P = m == null ? void 0 : m.getShortForm();
|
|
6811
6811
|
return (Q ? `- (${Q}` : "") + (P ? `- (${P}` : "") || "-";
|
|
6812
6812
|
}
|
|
6813
6813
|
function Le(m) {
|
|
6814
6814
|
k(m);
|
|
6815
6815
|
}
|
|
6816
|
-
function
|
|
6817
|
-
const
|
|
6816
|
+
function v(m) {
|
|
6817
|
+
const S = {
|
|
6818
6818
|
label: m,
|
|
6819
6819
|
key: m,
|
|
6820
6820
|
value: {
|
|
@@ -6828,8 +6828,8 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6828
6828
|
synonyms: []
|
|
6829
6829
|
}
|
|
6830
6830
|
};
|
|
6831
|
-
F([...z,
|
|
6832
|
-
c ? [
|
|
6831
|
+
F([...z, S]), k(
|
|
6832
|
+
c ? [S] : [...L, S]
|
|
6833
6833
|
);
|
|
6834
6834
|
}
|
|
6835
6835
|
return /* @__PURE__ */ r("div", { className: I, children: /* @__PURE__ */ r(
|
|
@@ -6849,7 +6849,7 @@ Synonyms: ` + P.synonyms.join(", "));
|
|
|
6849
6849
|
onSearchChange: E,
|
|
6850
6850
|
onChange: Le,
|
|
6851
6851
|
renderOption: ue,
|
|
6852
|
-
onCreateOption: n ?
|
|
6852
|
+
onCreateOption: n ? v : void 0,
|
|
6853
6853
|
rowHeight: d ? 30 : 50,
|
|
6854
6854
|
noSuggestions: !x
|
|
6855
6855
|
}
|
|
@@ -7225,12 +7225,12 @@ function mo(e) {
|
|
|
7225
7225
|
name: "Logo",
|
|
7226
7226
|
field: "config.logo",
|
|
7227
7227
|
// TODO: improve position of logo (maybe inside another cell, but this makes sorting more complicated)
|
|
7228
|
-
render: (
|
|
7228
|
+
render: (v) => v ? /* @__PURE__ */ r(
|
|
7229
7229
|
"img",
|
|
7230
7230
|
{
|
|
7231
7231
|
width: "100%",
|
|
7232
7232
|
style: { objectFit: "contain" },
|
|
7233
|
-
src:
|
|
7233
|
+
src: v.startsWith("/images") ? Cr + v : v,
|
|
7234
7234
|
alt: "-logo-"
|
|
7235
7235
|
}
|
|
7236
7236
|
) : /* @__PURE__ */ r(g, {}),
|
|
@@ -7246,14 +7246,14 @@ function mo(e) {
|
|
|
7246
7246
|
{
|
|
7247
7247
|
name: "Short Name",
|
|
7248
7248
|
field: "ontologyId",
|
|
7249
|
-
render: (
|
|
7249
|
+
render: (v) => /* @__PURE__ */ r(
|
|
7250
7250
|
Ze,
|
|
7251
7251
|
{
|
|
7252
7252
|
href: "#",
|
|
7253
7253
|
onClick: (m) => {
|
|
7254
|
-
m.preventDefault(), typeof a == "function" && a(
|
|
7254
|
+
m.preventDefault(), typeof a == "function" && a(v || "");
|
|
7255
7255
|
},
|
|
7256
|
-
children:
|
|
7256
|
+
children: v
|
|
7257
7257
|
}
|
|
7258
7258
|
),
|
|
7259
7259
|
width: "10%",
|
|
@@ -7284,21 +7284,21 @@ function mo(e) {
|
|
|
7284
7284
|
{
|
|
7285
7285
|
name: "Terms",
|
|
7286
7286
|
field: "numberOfTerms",
|
|
7287
|
-
render: (
|
|
7287
|
+
render: (v) => v ? /* @__PURE__ */ r(g, { children: v.toLocaleString() }) : /* @__PURE__ */ r(g, {}),
|
|
7288
7288
|
width: "7%",
|
|
7289
7289
|
sortable: !0
|
|
7290
7290
|
},
|
|
7291
7291
|
{
|
|
7292
7292
|
name: "Properties",
|
|
7293
7293
|
field: "numberOfProperties",
|
|
7294
|
-
render: (
|
|
7294
|
+
render: (v) => v ? /* @__PURE__ */ r(g, { children: v.toLocaleString() }) : /* @__PURE__ */ r(g, {}),
|
|
7295
7295
|
width: "7%",
|
|
7296
7296
|
sortable: !0
|
|
7297
7297
|
},
|
|
7298
7298
|
{
|
|
7299
7299
|
name: "Individuals",
|
|
7300
7300
|
field: "numberOfIndividuals",
|
|
7301
|
-
render: (
|
|
7301
|
+
render: (v) => v ? /* @__PURE__ */ r(g, { children: v.toLocaleString() }) : /* @__PURE__ */ r(g, {}),
|
|
7302
7302
|
width: "7%",
|
|
7303
7303
|
sortable: !0
|
|
7304
7304
|
},
|
|
@@ -7307,24 +7307,24 @@ function mo(e) {
|
|
|
7307
7307
|
actions: [
|
|
7308
7308
|
...e.actions || [],
|
|
7309
7309
|
{
|
|
7310
|
-
render: (
|
|
7310
|
+
render: (v) => /* @__PURE__ */ r(
|
|
7311
7311
|
ut,
|
|
7312
7312
|
{
|
|
7313
|
-
href:
|
|
7313
|
+
href: v.config.fileLocation,
|
|
7314
7314
|
iconType: "download",
|
|
7315
7315
|
"aria-label": "Download",
|
|
7316
|
-
isDisabled: !
|
|
7316
|
+
isDisabled: !v.config.allowDownload || !v.config.fileLocation || v.config.fileLocation.startsWith("file://")
|
|
7317
7317
|
}
|
|
7318
7318
|
)
|
|
7319
7319
|
}
|
|
7320
7320
|
]
|
|
7321
7321
|
}
|
|
7322
7322
|
], k = ({
|
|
7323
|
-
page:
|
|
7323
|
+
page: v,
|
|
7324
7324
|
sort: m
|
|
7325
7325
|
}) => {
|
|
7326
|
-
const { index:
|
|
7327
|
-
if (O(
|
|
7326
|
+
const { index: S, size: Q } = v;
|
|
7327
|
+
if (O(S), C(Q), m) {
|
|
7328
7328
|
const { field: P, direction: X } = m;
|
|
7329
7329
|
R(P), T(X);
|
|
7330
7330
|
}
|
|
@@ -7337,49 +7337,49 @@ function mo(e) {
|
|
|
7337
7337
|
["ontologiesData", t, l, c],
|
|
7338
7338
|
async () => w.getOntologiesData(e.parameter, c)
|
|
7339
7339
|
);
|
|
7340
|
-
function ie(
|
|
7340
|
+
function ie(v) {
|
|
7341
7341
|
return {
|
|
7342
|
-
ontologyId:
|
|
7343
|
-
loaded:
|
|
7344
|
-
numberOfTerms:
|
|
7345
|
-
numberOfProperties:
|
|
7346
|
-
numberOfIndividuals:
|
|
7342
|
+
ontologyId: v.getOntologyId(),
|
|
7343
|
+
loaded: v.getLoaded(),
|
|
7344
|
+
numberOfTerms: v.getNumClasses(),
|
|
7345
|
+
numberOfProperties: v.getNumProperties(),
|
|
7346
|
+
numberOfIndividuals: v.getNumIndividuals(),
|
|
7347
7347
|
config: {
|
|
7348
|
-
logo:
|
|
7349
|
-
title:
|
|
7350
|
-
description:
|
|
7351
|
-
preferredPrefix:
|
|
7352
|
-
allowDownload:
|
|
7353
|
-
fileLocation:
|
|
7354
|
-
version:
|
|
7355
|
-
iri:
|
|
7356
|
-
homepage:
|
|
7348
|
+
logo: v.getLogoURL(),
|
|
7349
|
+
title: v.getName().trim(),
|
|
7350
|
+
description: v.getDescription(),
|
|
7351
|
+
preferredPrefix: v.getPreferredPrefix(),
|
|
7352
|
+
allowDownload: v.getAllowDownload(),
|
|
7353
|
+
fileLocation: v.getIri(),
|
|
7354
|
+
version: v.getVersion(),
|
|
7355
|
+
iri: v.getIri(),
|
|
7356
|
+
homepage: v.getHomepage(),
|
|
7357
7357
|
annotations: {
|
|
7358
|
-
license:
|
|
7358
|
+
license: v.getLicense()
|
|
7359
7359
|
}
|
|
7360
7360
|
}
|
|
7361
7361
|
};
|
|
7362
7362
|
}
|
|
7363
|
-
const re = c ? (I == null ? void 0 : I.properties.map((
|
|
7364
|
-
...
|
|
7365
|
-
}))) || [] : (I == null ? void 0 : I.properties.map((
|
|
7363
|
+
const re = c ? (I == null ? void 0 : I.properties.map((v) => ({
|
|
7364
|
+
...v.properties
|
|
7365
|
+
}))) || [] : (I == null ? void 0 : I.properties.map((v) => ie(v))) || [], V = (v, m, S, Q, P) => {
|
|
7366
7366
|
let X;
|
|
7367
|
-
Q ? X =
|
|
7367
|
+
Q ? X = v.slice(0).sort(
|
|
7368
7368
|
fi.property(Q, fi.default(P))
|
|
7369
|
-
) : X =
|
|
7369
|
+
) : X = v;
|
|
7370
7370
|
let Ie;
|
|
7371
|
-
if (!m && !
|
|
7371
|
+
if (!m && !S)
|
|
7372
7372
|
Ie = X;
|
|
7373
7373
|
else {
|
|
7374
|
-
const fe = m *
|
|
7374
|
+
const fe = m * S;
|
|
7375
7375
|
Ie = X.slice(
|
|
7376
7376
|
fe,
|
|
7377
|
-
Math.min(fe +
|
|
7377
|
+
Math.min(fe + S, v.length)
|
|
7378
7378
|
);
|
|
7379
7379
|
}
|
|
7380
7380
|
return {
|
|
7381
7381
|
pageOfItems: Ie,
|
|
7382
|
-
totalItemCount:
|
|
7382
|
+
totalItemCount: v.length
|
|
7383
7383
|
};
|
|
7384
7384
|
}, { pageOfItems: G, totalItemCount: q } = V(
|
|
7385
7385
|
re,
|
|
@@ -7406,15 +7406,15 @@ function mo(e) {
|
|
|
7406
7406
|
field: p,
|
|
7407
7407
|
direction: f
|
|
7408
7408
|
}
|
|
7409
|
-
}, se = (
|
|
7410
|
-
var
|
|
7409
|
+
}, se = (v) => {
|
|
7410
|
+
var S, Q;
|
|
7411
7411
|
const m = { ...E };
|
|
7412
|
-
if (m[
|
|
7413
|
-
delete m[
|
|
7412
|
+
if (m[v.ontologyId])
|
|
7413
|
+
delete m[v.ontologyId];
|
|
7414
7414
|
else {
|
|
7415
7415
|
let P = null, X = "", Ie = "";
|
|
7416
|
-
if (
|
|
7417
|
-
const Oe =
|
|
7416
|
+
if (v.config.homepage && (P = v.config.homepage), (Q = (S = v == null ? void 0 : v.config) == null ? void 0 : S.annotations) != null && Q.license) {
|
|
7417
|
+
const Oe = v.config.annotations.license;
|
|
7418
7418
|
c ? Oe[0] !== "" && (X = `https://${Oe[0]}`, Ie = Oe[0]) : (X = Oe.url ? Oe.url : "", Ie = Oe.label ? Oe.label : "");
|
|
7419
7419
|
}
|
|
7420
7420
|
const fe = [];
|
|
@@ -7430,7 +7430,7 @@ function mo(e) {
|
|
|
7430
7430
|
children: `${Ie}`
|
|
7431
7431
|
}
|
|
7432
7432
|
)
|
|
7433
|
-
}), m[
|
|
7433
|
+
}), m[v.ontologyId] = /* @__PURE__ */ r(mr, { listItems: fe });
|
|
7434
7434
|
}
|
|
7435
7435
|
z(m);
|
|
7436
7436
|
}, Le = [
|
|
@@ -7441,16 +7441,16 @@ function mo(e) {
|
|
|
7441
7441
|
isExpander: !0,
|
|
7442
7442
|
name: /* @__PURE__ */ r(yr, { children: /* @__PURE__ */ r("span", { children: "Expand row" }) }),
|
|
7443
7443
|
mobileOptions: { header: !1 },
|
|
7444
|
-
render: (
|
|
7444
|
+
render: (v) => {
|
|
7445
7445
|
const m = { ...E };
|
|
7446
7446
|
return /* @__PURE__ */ r(
|
|
7447
7447
|
ut,
|
|
7448
7448
|
{
|
|
7449
7449
|
onClick: () => {
|
|
7450
|
-
se(
|
|
7450
|
+
se(v);
|
|
7451
7451
|
},
|
|
7452
|
-
iconType: m[
|
|
7453
|
-
"aria-label": m[
|
|
7452
|
+
iconType: m[v.ontologyId] ? "arrowDown" : "arrowRight",
|
|
7453
|
+
"aria-label": m[v.ontologyId] ? "Collapse" : "Expand"
|
|
7454
7454
|
}
|
|
7455
7455
|
);
|
|
7456
7456
|
}
|
|
@@ -7743,9 +7743,9 @@ function wo(e) {
|
|
|
7743
7743
|
const te = (H) => H.checked === "on", {
|
|
7744
7744
|
data: se,
|
|
7745
7745
|
isLoading: Le,
|
|
7746
|
-
isFetching:
|
|
7746
|
+
isFetching: v,
|
|
7747
7747
|
isSuccess: m,
|
|
7748
|
-
isError:
|
|
7748
|
+
isError: S,
|
|
7749
7749
|
error: Q
|
|
7750
7750
|
} = le(
|
|
7751
7751
|
[
|
|
@@ -7858,7 +7858,7 @@ function wo(e) {
|
|
|
7858
7858
|
}
|
|
7859
7859
|
) }),
|
|
7860
7860
|
Le && /* @__PURE__ */ r(Qe, { label: "Filter by type", children: /* @__PURE__ */ r(ce, { size: "s" }) }),
|
|
7861
|
-
|
|
7861
|
+
S && /* @__PURE__ */ r(Qe, { label: "Filter by type", children: /* @__PURE__ */ r(
|
|
7862
7862
|
St,
|
|
7863
7863
|
{
|
|
7864
7864
|
options: [],
|
|
@@ -7881,7 +7881,7 @@ function wo(e) {
|
|
|
7881
7881
|
}
|
|
7882
7882
|
) }),
|
|
7883
7883
|
Le && /* @__PURE__ */ r(Qe, { label: "Filter by ontology", children: /* @__PURE__ */ r(ce, { size: "s" }) }),
|
|
7884
|
-
|
|
7884
|
+
S && /* @__PURE__ */ r(Qe, { label: "Filter by ontology", children: /* @__PURE__ */ r(
|
|
7885
7885
|
St,
|
|
7886
7886
|
{
|
|
7887
7887
|
options: [],
|
|
@@ -7956,7 +7956,7 @@ function wo(e) {
|
|
|
7956
7956
|
}
|
|
7957
7957
|
),
|
|
7958
7958
|
/* @__PURE__ */ r(he, { size: "s" }),
|
|
7959
|
-
|
|
7959
|
+
v && /* @__PURE__ */ h(g, { children: [
|
|
7960
7960
|
/* @__PURE__ */ h(
|
|
7961
7961
|
Ce,
|
|
7962
7962
|
{
|