@abi-software/map-side-bar 2.19.0 → 2.20.0
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/map-side-bar.js +115 -70
- package/dist/map-side-bar.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/ConnectivityInfo.vue +3 -0
package/dist/map-side-bar.js
CHANGED
|
@@ -12947,7 +12947,7 @@ var hS = /*#__PURE__*/ uS(dS, [["render", mS], ["__scopeId", "data-v-6c749802"]]
|
|
|
12947
12947
|
onClick: (e) => r("clicked", n)
|
|
12948
12948
|
}, null, 10, bS))), 128))]));
|
|
12949
12949
|
}
|
|
12950
|
-
}, [["__scopeId", "data-v-
|
|
12950
|
+
}, [["__scopeId", "data-v-172d1c0c"]]), SS = {
|
|
12951
12951
|
tab: "Tab",
|
|
12952
12952
|
enter: "Enter",
|
|
12953
12953
|
space: "Space",
|
|
@@ -19761,13 +19761,60 @@ function tz() {
|
|
|
19761
19761
|
timeout: n
|
|
19762
19762
|
});
|
|
19763
19763
|
}
|
|
19764
|
+
function n(e, t, n) {
|
|
19765
|
+
return `${e}/${t}/files/${encodeURIComponent(n)}`;
|
|
19766
|
+
}
|
|
19767
|
+
function r(e, t) {
|
|
19768
|
+
if (t && e) {
|
|
19769
|
+
for (let n = 0; n < e.length; n++) if (t === e[n].dataset.path) return e[n];
|
|
19770
|
+
}
|
|
19771
|
+
}
|
|
19772
|
+
function i(e, t) {
|
|
19773
|
+
if (t && e) return r(t, e.datacite.isSourceOf.path[0]);
|
|
19774
|
+
}
|
|
19775
|
+
function a(e, t, n, i) {
|
|
19776
|
+
if (n && n.length > 0) {
|
|
19777
|
+
let a;
|
|
19778
|
+
if (e && t) {
|
|
19779
|
+
let i = r(t, e.datacite.isSourceOf.path[0]);
|
|
19780
|
+
i && (a = r(n, i.datacite.isSourceOf.path[0]));
|
|
19781
|
+
}
|
|
19782
|
+
if (a) return a;
|
|
19783
|
+
if (i < n.length) return n[i];
|
|
19784
|
+
}
|
|
19785
|
+
}
|
|
19786
|
+
function o(e, t) {
|
|
19787
|
+
let n = `${e}/s3-resource/${t.datasetId}/${t.datasetVersion}/files/${t.file_path}?encodeBase64=true`;
|
|
19788
|
+
return t.s3Bucket && (n += `&s3BucketName=${t.s3Bucket}`), n;
|
|
19789
|
+
}
|
|
19790
|
+
function s(e, t) {
|
|
19791
|
+
let n = `${e}/thumbnail/neurolucida`;
|
|
19792
|
+
return n += `?datasetId=${t.datasetId}`, n += `&version=${t.datasetVersion}`, n += `&path=files/${t.segmentationFilePath}`, t.s3Bucket && (n += `&s3BucketName=${t.s3Bucket}`), n;
|
|
19793
|
+
}
|
|
19794
|
+
function c(e, t) {
|
|
19795
|
+
return `${e}/thumbnail/${t.id}`;
|
|
19796
|
+
}
|
|
19797
|
+
function l(e, n, r) {
|
|
19798
|
+
t(`${e}/image/${r.id}`, {}, 2e4).then((e) => {
|
|
19799
|
+
let t = n.find((e) => e.id === r.id), i = e.name;
|
|
19800
|
+
i && (t.title = i);
|
|
19801
|
+
}, (t) => (t.message.includes("timeout") && t.message.includes("exceeded") && r.fetchAttempts < 3 && (r.fetchAttempts += 1, l(e, n, r)), Promise.reject("Maximum iterations reached.")));
|
|
19802
|
+
}
|
|
19764
19803
|
return {
|
|
19765
19804
|
defaultImg: e,
|
|
19766
|
-
getRequest: t
|
|
19805
|
+
getRequest: t,
|
|
19806
|
+
getS3FilePath: n,
|
|
19807
|
+
findEntryWithPathInArray: r,
|
|
19808
|
+
getThumbnailForPlot: i,
|
|
19809
|
+
getThumbnailForScaffold: a,
|
|
19810
|
+
getImageURLFromS3: o,
|
|
19811
|
+
getSegmentationThumbnailURL: s,
|
|
19812
|
+
getThumbnailURLFromBiolucida: c,
|
|
19813
|
+
getImageInfoFromBiolucida: l
|
|
19767
19814
|
};
|
|
19768
19815
|
}
|
|
19769
|
-
var nz = ["src"], rz = ["src"], iz = {
|
|
19770
|
-
key:
|
|
19816
|
+
var nz = ["src"], rz = ["src", "crossorigin"], iz = {
|
|
19817
|
+
key: 0,
|
|
19771
19818
|
class: "details"
|
|
19772
19819
|
}, az = { key: 0 }, oz = { class: "title text-placeholder" }, sz = /*#__PURE__*/ vS({
|
|
19773
19820
|
__name: "Card",
|
|
@@ -19803,6 +19850,10 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
19803
19850
|
shadow: {
|
|
19804
19851
|
type: String,
|
|
19805
19852
|
default: "always"
|
|
19853
|
+
},
|
|
19854
|
+
crossorigin: {
|
|
19855
|
+
type: String,
|
|
19856
|
+
default: "anonymous"
|
|
19806
19857
|
}
|
|
19807
19858
|
},
|
|
19808
19859
|
emits: ["card-clicked", "datalink-clicked"],
|
|
@@ -19816,12 +19867,8 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
19816
19867
|
}
|
|
19817
19868
|
return t.protocol === "http:" || t.protocol === "https:";
|
|
19818
19869
|
}
|
|
19819
|
-
let { defaultImg: r, getRequest: i } = tz(), a = B();
|
|
19820
|
-
|
|
19821
|
-
let s = B(void 0), f = B(!1), h = B(!1), g = B(!1), _ = e, v = t, y = o(() => _.data.title && ((s ? s.value : !1) || f.value) && (_.data.link || _.data.userData));
|
|
19822
|
-
o(() => showCardDetails ? height * .525 : height), o(() => width - 2 * b), o(() => height * .237);
|
|
19823
|
-
let b = o(() => height * .076);
|
|
19824
|
-
o(() => showCardDetails ? height * .525 : height), G(() => _.data, () => {
|
|
19870
|
+
let { defaultImg: r, getRequest: i } = tz(), a = B(), s = B(void 0), f = B(!1), h = B(!1), g = B(!1), _ = e, v = o(() => _.data.crossorigin || _.crossorigin || "anonymous"), y = t, b = o(() => _.data.title && (s.value || f.value) && (_.data.link || _.data.userData));
|
|
19871
|
+
G(() => _.data, () => {
|
|
19825
19872
|
s.value = void 0, f.value = !1, g.value = !1, h.value = !1, _.data.thumbnail ? n(_.data.thumbnail) && _.data.mimetype ? S(_.data.thumbnail, { fetchAttempts: 0 }) : s.value = _.data.thumbnail : f.value = !0, E(() => {
|
|
19826
19873
|
C();
|
|
19827
19874
|
});
|
|
@@ -19833,9 +19880,9 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
19833
19880
|
function x() {
|
|
19834
19881
|
if (_.data.link) {
|
|
19835
19882
|
let e = document.createElement("a");
|
|
19836
|
-
e.href = _.data.link, e.target = "_blank", document.body.appendChild(e), e.click(),
|
|
19883
|
+
e.href = _.data.link, e.target = "_blank", document.body.appendChild(e), e.click(), y("datalink-clicked", _.data.link), e.remove();
|
|
19837
19884
|
}
|
|
19838
|
-
_.data.userData &&
|
|
19885
|
+
_.data.userData && y("card-clicked", _.data.userData);
|
|
19839
19886
|
}
|
|
19840
19887
|
function S(e, t) {
|
|
19841
19888
|
i(e, {}, 11e3).then((e) => {
|
|
@@ -19848,7 +19895,7 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
19848
19895
|
function C() {
|
|
19849
19896
|
if (_.data.hideTitle) h.value = !0, g.value = !0;
|
|
19850
19897
|
else {
|
|
19851
|
-
let e = a;
|
|
19898
|
+
let e = a.value;
|
|
19852
19899
|
e && e.offsetParent ? (g.value = !0, e.offsetWidth >= e.scrollWidth ? h.value = !0 : h.value = !1) : _.data.title.length > 20 ? h.value = !1 : h.value = !0;
|
|
19853
19900
|
}
|
|
19854
19901
|
}
|
|
@@ -19863,53 +19910,50 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
19863
19910
|
}),
|
|
19864
19911
|
class: "card"
|
|
19865
19912
|
}, {
|
|
19866
|
-
default: K(() => [Ce((L(), u("div", null, [
|
|
19867
|
-
|
|
19868
|
-
|
|
19869
|
-
|
|
19870
|
-
|
|
19871
|
-
|
|
19872
|
-
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
l("", !0),
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
19905
|
-
|
|
19906
|
-
|
|
19907
|
-
|
|
19908
|
-
|
|
19909
|
-
|
|
19910
|
-
})
|
|
19911
|
-
])) : l("", !0)
|
|
19912
|
-
])), [[_, !y.value]])]),
|
|
19913
|
+
default: K(() => [Ce((L(), u("div", null, [d("div", {
|
|
19914
|
+
class: "cursor-pointer",
|
|
19915
|
+
style: k(e.imageContainerStyle),
|
|
19916
|
+
onClick: Te(x, ["prevent"])
|
|
19917
|
+
}, [f.value ? (L(), u("img", {
|
|
19918
|
+
key: 0,
|
|
19919
|
+
src: W(r),
|
|
19920
|
+
style: k(e.imageStyle)
|
|
19921
|
+
}, null, 12, nz)) : (L(), u("img", {
|
|
19922
|
+
key: 1,
|
|
19923
|
+
src: s.value,
|
|
19924
|
+
alt: "thumbnail loading ...",
|
|
19925
|
+
crossorigin: v.value,
|
|
19926
|
+
style: k(e.imageStyle)
|
|
19927
|
+
}, null, 12, rz))], 4), e.showCardDetails ? (L(), u("div", iz, [
|
|
19928
|
+
e.data.hideType ? l("", !0) : (L(), u("p", az, [d("b", null, U(e.data.type), 1)])),
|
|
19929
|
+
m(i, {
|
|
19930
|
+
"virtual-ref": a.value,
|
|
19931
|
+
disabled: h.value,
|
|
19932
|
+
content: e.data.title,
|
|
19933
|
+
placement: "top",
|
|
19934
|
+
trigger: "hover",
|
|
19935
|
+
"popper-class": "gallery-popper",
|
|
19936
|
+
"virtual-triggering": ""
|
|
19937
|
+
}, null, 8, [
|
|
19938
|
+
"virtual-ref",
|
|
19939
|
+
"disabled",
|
|
19940
|
+
"content"
|
|
19941
|
+
]),
|
|
19942
|
+
Ce(d("p", {
|
|
19943
|
+
ref_key: "titleText",
|
|
19944
|
+
ref: a,
|
|
19945
|
+
class: "title"
|
|
19946
|
+
}, U(e.data.title), 513), [[be, !e.data.hideTitle]]),
|
|
19947
|
+
Ce(d("p", oz, null, 512), [[be, e.data.hideTitle]]),
|
|
19948
|
+
m(o, {
|
|
19949
|
+
class: "button",
|
|
19950
|
+
onClick: Te(x, ["prevent"]),
|
|
19951
|
+
size: "large"
|
|
19952
|
+
}, {
|
|
19953
|
+
default: K(() => [p(" View " + U(e.data.type), 1)]),
|
|
19954
|
+
_: 1
|
|
19955
|
+
})
|
|
19956
|
+
])) : l("", !0)])), [[_, !b.value]])]),
|
|
19913
19957
|
_: 1
|
|
19914
19958
|
}, 8, [
|
|
19915
19959
|
"shadow",
|
|
@@ -19918,7 +19962,7 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
19918
19962
|
]);
|
|
19919
19963
|
};
|
|
19920
19964
|
}
|
|
19921
|
-
}, [["__scopeId", "data-v-
|
|
19965
|
+
}, [["__scopeId", "data-v-f78dab5d"]]), cz = {
|
|
19922
19966
|
ref: "myButton",
|
|
19923
19967
|
class: "gallery"
|
|
19924
19968
|
}, lz = { class: "gallery-strip" }, uz = {
|
|
@@ -19989,6 +20033,10 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
19989
20033
|
shadow: {
|
|
19990
20034
|
type: String,
|
|
19991
20035
|
default: "always"
|
|
20036
|
+
},
|
|
20037
|
+
crossorigin: {
|
|
20038
|
+
type: String,
|
|
20039
|
+
default: "anonymous"
|
|
19992
20040
|
}
|
|
19993
20041
|
},
|
|
19994
20042
|
emits: ["card-clicked", "datalink-clicked"],
|
|
@@ -19996,12 +20044,7 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
19996
20044
|
function i(e) {
|
|
19997
20045
|
return typeof window < "u" ? e * parseFloat(window.getComputedStyle(document.documentElement).fontSize) : e * 16;
|
|
19998
20046
|
}
|
|
19999
|
-
let a = e, s = r, f = B(0), p = B(0), m = B(2), h = B(2), g = o(() => a.items.length), _ = o(() => p.value > 0), v = o(() => p.value < g.value - 1), y = o(() => .78 * a.cardWidth)
|
|
20000
|
-
o(() => {
|
|
20001
|
-
let e = .25;
|
|
20002
|
-
return g.value * (a.cardWidth + e) - e;
|
|
20003
|
-
});
|
|
20004
|
-
let b = o(() => {
|
|
20047
|
+
let a = e, s = r, f = B(0), p = B(0), m = B(2), h = B(2), g = o(() => a.items.length), _ = o(() => p.value > 0), v = o(() => p.value < g.value - 1), y = o(() => .78 * a.cardWidth), b = o(() => {
|
|
20005
20048
|
let e = i(.5), t = i(2), n = i(a.cardWidth), r = (a.maxWidth - 2 * t - 2 * e) / (1.1 * n);
|
|
20006
20049
|
return Math.max(1, Math.floor(r));
|
|
20007
20050
|
}), x = o(() => {
|
|
@@ -20069,6 +20112,7 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
20069
20112
|
height: y.value,
|
|
20070
20113
|
shadow: e.shadow,
|
|
20071
20114
|
"show-card-details": e.showCardDetails,
|
|
20115
|
+
crossorigin: e.crossorigin,
|
|
20072
20116
|
onCardClicked: w,
|
|
20073
20117
|
onDatalinkClicked: T
|
|
20074
20118
|
}, null, 8, [
|
|
@@ -20079,7 +20123,8 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
20079
20123
|
"width",
|
|
20080
20124
|
"height",
|
|
20081
20125
|
"shadow",
|
|
20082
|
-
"show-card-details"
|
|
20126
|
+
"show-card-details",
|
|
20127
|
+
"crossorigin"
|
|
20083
20128
|
])) : l("", !0)], 2))), 128))]),
|
|
20084
20129
|
r[3] ||= d("div", { class: "filler" }, null, -1),
|
|
20085
20130
|
e.items.length > 1 ? (L(), u("a", {
|
|
@@ -20102,7 +20147,7 @@ var nz = ["src"], rz = ["src"], iz = {
|
|
|
20102
20147
|
}, null, 8, ["count", "current"])) : l("", !0)
|
|
20103
20148
|
], 512));
|
|
20104
20149
|
}
|
|
20105
|
-
}, [["__scopeId", "data-v-
|
|
20150
|
+
}, [["__scopeId", "data-v-a546ba46"]]) },
|
|
20106
20151
|
props: {
|
|
20107
20152
|
category: {
|
|
20108
20153
|
type: String,
|
|
@@ -27155,7 +27200,7 @@ function vK(e, n, r, i, a, o) {
|
|
|
27155
27200
|
], 64)) : l("", !0)])) : l("", !0)]))), 128))])])) : l("", !0)
|
|
27156
27201
|
])) : l("", !0);
|
|
27157
27202
|
}
|
|
27158
|
-
var yK = /*#__PURE__*/ uS(RG, [["render", vK], ["__scopeId", "data-v-
|
|
27203
|
+
var yK = /*#__PURE__*/ uS(RG, [["render", vK], ["__scopeId", "data-v-cbf988e3"]]), bK = {
|
|
27159
27204
|
name: "ConnectivityCard",
|
|
27160
27205
|
data() {
|
|
27161
27206
|
return { displayFields: ["id", "nerve-label"] };
|