@abi-software/mapintegratedvuer 1.20.1 → 1.21.1
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/cypress.config.js +8 -7
- package/dist/ConnectivityGraph-CZMROk9r.js +121 -0
- package/dist/ContentMixin-Vn34n5t2.js +1672 -0
- package/dist/DynamicMarkerMixin-BS6t7w_i.js +50 -0
- package/dist/Flatmap-BejxA0uz.js +193 -0
- package/dist/Iframe-BWbhTjCR.js +18 -0
- package/dist/MultiFlatmap-nlmsH-Ib.js +303 -0
- package/dist/Plot-ChbPsDZX.js +28 -0
- package/dist/Scaffold-C6f7c7Ha.js +308 -0
- package/dist/Simulation-DcJScRYo.js +25 -0
- package/dist/connectivities-UXTqf7_0.js +35743 -0
- package/dist/mapintegratedvuer.js +43234 -3
- package/dist/mapintegratedvuer.umd.cjs +556 -297
- package/dist/style.css +2 -1
- package/eslint.config.js +33 -0
- package/package.json +61 -76
- package/src/assets/fonts.scss +2 -0
- package/src/assets/header-icon.scss +2 -1
- package/src/assets/styles.scss +2 -3
- package/src/components/CustomSplitter.vue +3 -3
- package/src/components/SearchControls.vue +1 -1
- package/src/components/index.js +1 -0
- package/src/components/scripts/simulation_data.js +461 -0
- package/src/components/viewers/Flatmap.vue +11 -7
- package/src/components/viewers/MultiFlatmap.vue +12 -8
- package/src/components.d.ts +6 -2
- package/src/main.js +2 -1
- package/src/mixins/DynamicMarkerMixin.js +3 -3
- package/vite.bundle-build.js +19 -4
- package/vite.config.js +16 -1
- package/babel.config.js +0 -0
- package/dist/ConnectivityGraph-C2SH21O2.js +0 -123
- package/dist/ContentMixin-DyNQa5V5.js +0 -1725
- package/dist/Flatmap-2O4GdIZV.js +0 -203
- package/dist/Iframe-ComVJ_Ev.js +0 -20
- package/dist/MultiFlatmap-oVdJqKEz.js +0 -317
- package/dist/Plot-CYyVTjHQ.js +0 -25
- package/dist/Scaffold-DXGZqxdu.js +0 -305
- package/dist/Simulation-DNOubbSn.js +0 -28
- package/dist/index-BkejiyeA.js +0 -79223
- package/dist/style-3VbUVJif.js +0 -57
- package/static.json +0 -7
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { v as e } from "./connectivities-UXTqf7_0.js";
|
|
2
|
+
import { mapStores as t } from "pinia";
|
|
3
|
+
//#region src/mixins/DynamicMarkerMixin.js
|
|
4
|
+
var n = function(e) {
|
|
5
|
+
return e ? [...new Set(e.map((e) => JSON.stringify(e)))].map((e) => JSON.parse(e)) : [];
|
|
6
|
+
}, r = {
|
|
7
|
+
computed: { ...t(e) },
|
|
8
|
+
methods: {
|
|
9
|
+
flatmapPanZoomCallback: function(e) {
|
|
10
|
+
if (this.mouseHovered) {
|
|
11
|
+
let t = {
|
|
12
|
+
paneIndex: this.entry.id,
|
|
13
|
+
eventType: "panZoom",
|
|
14
|
+
payload: e,
|
|
15
|
+
type: this.entry.type
|
|
16
|
+
};
|
|
17
|
+
this.$emit("resource-selected", t);
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
flatmapMarkerUpdate(e) {
|
|
21
|
+
if (!this.flatmapReady) return;
|
|
22
|
+
let t = e;
|
|
23
|
+
if (t ||= this.getFlatmapImp(), t) {
|
|
24
|
+
let e = this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.markers : [];
|
|
25
|
+
e = n(e), t.clearMarkers(), t.clearClusteredAnatomicalMarkers(), t.addClusteredAnatomicalMarkers(e), this.entry.type === "MultiFlatmap" && this.restoreFeaturedMarkers(t);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
removeMarkersNotOnFlatmap(e, t) {
|
|
29
|
+
let n = e.anatomicalIdentifiers, r = [];
|
|
30
|
+
for (let e = 0; e < t.length; e++) {
|
|
31
|
+
let i = t[e], a = {
|
|
32
|
+
id: i.id,
|
|
33
|
+
terms: []
|
|
34
|
+
};
|
|
35
|
+
for (let e = 0; e < i.terms.length; e++) n.includes(i.terms[e]) && a.terms.push(i.terms[e]);
|
|
36
|
+
r.push(a);
|
|
37
|
+
}
|
|
38
|
+
return r;
|
|
39
|
+
},
|
|
40
|
+
flatmapReadyForMarkerUpdates: function(e) {
|
|
41
|
+
if (e) {
|
|
42
|
+
e.enablePanZoomEvents(!0), this.flatmapReady = !0;
|
|
43
|
+
let t = e.mapImp;
|
|
44
|
+
this.flatmapMarkerUpdate(t);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { r as t };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { C as e, _ as t, b as n, y as r } from "./connectivities-UXTqf7_0.js";
|
|
2
|
+
import "./mapintegratedvuer.js";
|
|
3
|
+
import { t as i } from "./ContentMixin-Vn34n5t2.js";
|
|
4
|
+
import { t as a } from "./DynamicMarkerMixin-BS6t7w_i.js";
|
|
5
|
+
import { createBlock as o, createCommentVNode as s, createElementBlock as c, createVNode as l, openBlock as u, resolveComponent as d } from "vue";
|
|
6
|
+
import { FlatmapVuer as f } from "@abi-software/flatmapvuer";
|
|
7
|
+
import "@abi-software/flatmapvuer/dist/style.css";
|
|
8
|
+
//#region src/components/viewers/Flatmap.vue
|
|
9
|
+
var p = {
|
|
10
|
+
name: "Flatmap",
|
|
11
|
+
mixins: [i, a],
|
|
12
|
+
components: {
|
|
13
|
+
FlatmapVuer: f,
|
|
14
|
+
HelpModeDialog: e
|
|
15
|
+
},
|
|
16
|
+
data: function() {
|
|
17
|
+
return {
|
|
18
|
+
flatmapReady: !1,
|
|
19
|
+
displayMinimap: !1
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
methods: {
|
|
23
|
+
getState: function() {
|
|
24
|
+
return this.$refs.flatmap.getState();
|
|
25
|
+
},
|
|
26
|
+
search: function(e) {
|
|
27
|
+
return this.$refs.flatmap.searchAndShowResult(e, !0, !0);
|
|
28
|
+
},
|
|
29
|
+
getFlatmapImp() {
|
|
30
|
+
return this.$refs.flatmap?.mapImp;
|
|
31
|
+
},
|
|
32
|
+
contextRestored(e) {
|
|
33
|
+
this.flatmapReadyForMarkerUpdates(e), this.updateViewerSettings();
|
|
34
|
+
},
|
|
35
|
+
flatmapReadyCall: function(e) {
|
|
36
|
+
this.flatmapReady = !0;
|
|
37
|
+
let t = this.getFlatmapImp();
|
|
38
|
+
t?.mapMetadata?.name && (this.updateEntryLabel(t?.mapMetadata?.name), this.updateEntryTitle(t?.mapMetadata?.name));
|
|
39
|
+
let r = {
|
|
40
|
+
id: this.entry.id,
|
|
41
|
+
prov: t.mapMetadata
|
|
42
|
+
};
|
|
43
|
+
n.emit("mapImpProv", r), this.$emit("flatmap-provenance-ready", r), this.flatmapReadyForMarkerUpdates(e), this.updateViewerSettings(), this.loadConnectivityExplorerConfig(e).then(() => {
|
|
44
|
+
n.emit("mapLoaded", e);
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
onPathwaySelectionChanged: function(e) {
|
|
48
|
+
let { label: t, property: n, checked: i, selectionsTitle: a } = e;
|
|
49
|
+
r.sendEvent({
|
|
50
|
+
event: "interaction_event",
|
|
51
|
+
event_name: "portal_maps_pathway_change",
|
|
52
|
+
category: t + " [" + n + "] " + i,
|
|
53
|
+
location: a
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
onSidebarAnnotationClose: function() {
|
|
57
|
+
this.flatmapReady && this.$refs.flatmap && this.$refs.flatmap.annotationEventCallback({}, { type: "aborted" });
|
|
58
|
+
},
|
|
59
|
+
searchSuggestions: function(e, t) {
|
|
60
|
+
if (e && this.$refs.flatmap.mapImp) {
|
|
61
|
+
let n = this.$refs.flatmap.mapImp.search(e);
|
|
62
|
+
(n.__featureIds || n.featureIds).forEach((e) => {
|
|
63
|
+
let n = this.$refs.flatmap.mapImp.annotation(e);
|
|
64
|
+
n && n.label && t.push(n.label);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
showConnectivity: function(e) {
|
|
69
|
+
if (this?.alive) {
|
|
70
|
+
let { featureIds: t, offset: n } = e, r = this.$refs.flatmap;
|
|
71
|
+
r && r.moveMap(t, {
|
|
72
|
+
offsetX: n ? -150 : 0,
|
|
73
|
+
zoom: 4
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
showConnectivityTooltips: function(e) {
|
|
78
|
+
this?.alive && this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().showConnectivityTooltips(e);
|
|
79
|
+
},
|
|
80
|
+
showConnectivitiesByReference: function(e) {
|
|
81
|
+
if (this?.alive) {
|
|
82
|
+
let t = this.$refs.flatmap;
|
|
83
|
+
t && t.showConnectivitiesByReference(e);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
changeConnectivitySource: function(e, t) {
|
|
87
|
+
if (this?.alive && this.flatmapReady) {
|
|
88
|
+
let n = this.$refs.flatmap, r = n.mapImp.mapMetadata.uuid;
|
|
89
|
+
t.includes(r) || (t.push(r), n.changeConnectivitySource(e));
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
zoomToFeatures: function(e, t) {
|
|
93
|
+
let n = e.name, r = this.$refs.flatmap.mapImp;
|
|
94
|
+
if (n) {
|
|
95
|
+
let e = r.search(n);
|
|
96
|
+
if (e.featureIds.length) {
|
|
97
|
+
let n = r.modelForFeature(e.featureIds[0]);
|
|
98
|
+
n ? (t && r.selectFeatures(n), r.zoomToFeatures(n)) : r.clearSearchResults();
|
|
99
|
+
}
|
|
100
|
+
} else r.clearSearchResults();
|
|
101
|
+
},
|
|
102
|
+
changeViewingMode: function(e) {
|
|
103
|
+
this.$refs.flatmap && this.$refs.flatmap.changeViewingMode(e);
|
|
104
|
+
},
|
|
105
|
+
updateViewerSettings: function() {
|
|
106
|
+
let { backgroundDisplay: e, viewingMode: t, flightPathDisplay: n, organsDisplay: r, outlinesDisplay: i, connectionType: a } = this.settingsStore.globalSettings, o = this.$refs.flatmap;
|
|
107
|
+
o && (o.changeViewingMode(t), o.setFlightPath3D(n), o.setColour(r), o.setOutlines(i), o.backgroundChangeCallback(e), o.setConnectionType(a));
|
|
108
|
+
},
|
|
109
|
+
setVisibilityFilter: function(e) {
|
|
110
|
+
if (this?.alive) {
|
|
111
|
+
let t = this.$refs.flatmap;
|
|
112
|
+
t && t.setVisibilityFilter(e);
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
getKnowledgeTooltip: async function(e) {
|
|
116
|
+
if (this?.alive) {
|
|
117
|
+
let t = this.$refs.flatmap;
|
|
118
|
+
if (t) {
|
|
119
|
+
let n = e.data[0];
|
|
120
|
+
t.searchAndShowResult(n.id, !0, !1);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
computed: { facetSpecies() {
|
|
126
|
+
return this.settingsStore.facets.species;
|
|
127
|
+
} }
|
|
128
|
+
}, m = { class: "viewer-container" };
|
|
129
|
+
function h(e, t, n, r, i, a) {
|
|
130
|
+
let f = d("FlatmapVuer"), p = d("HelpModeDialog");
|
|
131
|
+
return u(), c("div", m, [l(f, {
|
|
132
|
+
state: e.entry.state,
|
|
133
|
+
entry: e.entry.resource,
|
|
134
|
+
mapManager: e.mapManager,
|
|
135
|
+
onResourceSelected: t[0] ||= (t) => e.flatmapResourceSelected(e.entry.type, t),
|
|
136
|
+
onPanZoomCallback: e.flatmapPanZoomCallback,
|
|
137
|
+
name: e.entry.resource,
|
|
138
|
+
style: {
|
|
139
|
+
height: "100%",
|
|
140
|
+
width: "100%"
|
|
141
|
+
},
|
|
142
|
+
minZoom: e.entry.minZoom,
|
|
143
|
+
helpMode: e.helpMode,
|
|
144
|
+
helpModeActiveItem: e.helpModeActiveItem,
|
|
145
|
+
helpModeInitialIndex: -1,
|
|
146
|
+
helpModeDialog: e.useHelpModeDialog,
|
|
147
|
+
onHelpModeLastItem: e.onHelpModeLastItem,
|
|
148
|
+
onShownTooltip: e.onTooltipShown,
|
|
149
|
+
onShownMapTooltip: e.onMapTooltipShown,
|
|
150
|
+
onAnnotationOpen: e.onAnnotationOpen,
|
|
151
|
+
onAnnotationClose: e.onAnnotationClose,
|
|
152
|
+
onUpdateOfflineAnnotationEnabled: e.updateOfflineAnnotationEnabled,
|
|
153
|
+
annotationSidebar: e.annotationSidebar,
|
|
154
|
+
onConnectivityInfoOpen: e.onConnectivityInfoOpen,
|
|
155
|
+
onConnectivityError: e.onConnectivityError,
|
|
156
|
+
onConnectivityInfoClose: e.onConnectivityInfoClose,
|
|
157
|
+
onNeuronConnectionFeatureClick: e.onNeuronConnectionFeatureClick,
|
|
158
|
+
connectivityInfoSidebar: e.connectivityInfoSidebar,
|
|
159
|
+
pathControls: !0,
|
|
160
|
+
ref: "flatmap",
|
|
161
|
+
onContextRestored: a.contextRestored,
|
|
162
|
+
onReady: a.flatmapReadyCall,
|
|
163
|
+
displayMinimap: e.displayMinimap,
|
|
164
|
+
displayWarning: !1,
|
|
165
|
+
enableOpenMapUI: !0,
|
|
166
|
+
flatmapAPI: e.flatmapAPI,
|
|
167
|
+
render: e.visible,
|
|
168
|
+
sparcAPI: e.apiLocation,
|
|
169
|
+
showLocalSettings: e.showLocalSettings,
|
|
170
|
+
showOpenMapButton: e.showOpenMapButton,
|
|
171
|
+
onOpenMap: e.openMap,
|
|
172
|
+
onPathwaySelectionChanged: a.onPathwaySelectionChanged,
|
|
173
|
+
onMapmanagerLoaded: e.onMapmanagerLoaded,
|
|
174
|
+
showPathwayFilter: !1,
|
|
175
|
+
tooltipContentProvider: e.tooltipPathLabelProvider,
|
|
176
|
+
onTrackEvent: e.trackEvent
|
|
177
|
+
}, null, 8, /* @__PURE__ */ "state.entry.mapManager.onPanZoomCallback.name.minZoom.helpMode.helpModeActiveItem.helpModeDialog.onHelpModeLastItem.onShownTooltip.onShownMapTooltip.onAnnotationOpen.onAnnotationClose.onUpdateOfflineAnnotationEnabled.annotationSidebar.onConnectivityInfoOpen.onConnectivityError.onConnectivityInfoClose.onNeuronConnectionFeatureClick.connectivityInfoSidebar.onContextRestored.onReady.displayMinimap.flatmapAPI.render.sparcAPI.showLocalSettings.showOpenMapButton.onOpenMap.onPathwaySelectionChanged.onMapmanagerLoaded.tooltipContentProvider.onTrackEvent".split(".")), e.helpMode && e.useHelpModeDialog ? (u(), o(p, {
|
|
178
|
+
key: 0,
|
|
179
|
+
ref: "flatmapHelp",
|
|
180
|
+
flatmapRef: e.flatmapRef,
|
|
181
|
+
lastItem: e.helpModeLastItem,
|
|
182
|
+
onShowNext: e.onHelpModeShowNext,
|
|
183
|
+
onFinishHelpMode: e.onFinishHelpMode
|
|
184
|
+
}, null, 8, [
|
|
185
|
+
"flatmapRef",
|
|
186
|
+
"lastItem",
|
|
187
|
+
"onShowNext",
|
|
188
|
+
"onFinishHelpMode"
|
|
189
|
+
])) : s("", !0)]);
|
|
190
|
+
}
|
|
191
|
+
var g = /*#__PURE__*/ t(p, [["render", h], ["__scopeId", "data-v-daa2d4bf"]]);
|
|
192
|
+
//#endregion
|
|
193
|
+
export { g as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { _ as e } from "./connectivities-UXTqf7_0.js";
|
|
2
|
+
import { t } from "./ContentMixin-Vn34n5t2.js";
|
|
3
|
+
import { createElementBlock as n, createElementVNode as r, openBlock as i } from "vue";
|
|
4
|
+
//#region src/components/viewers/Iframe.vue
|
|
5
|
+
var a = {
|
|
6
|
+
name: "Iframe",
|
|
7
|
+
mixins: [t]
|
|
8
|
+
}, o = { class: "map-iframe-container" }, s = ["src"];
|
|
9
|
+
function c(e, t, a, c, l, u) {
|
|
10
|
+
return i(), n("div", o, [r("iframe", {
|
|
11
|
+
class: "my-iframe",
|
|
12
|
+
src: e.entry.resource.share_link,
|
|
13
|
+
ref: "iframe"
|
|
14
|
+
}, null, 8, s)]);
|
|
15
|
+
}
|
|
16
|
+
var l = /*#__PURE__*/ e(a, [["render", c], ["__scopeId", "data-v-fde9a2bb"]]);
|
|
17
|
+
//#endregion
|
|
18
|
+
export { l as default };
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { C as e, _ as t, b as n, c as r, u as i, y as a } from "./connectivities-UXTqf7_0.js";
|
|
2
|
+
import "./mapintegratedvuer.js";
|
|
3
|
+
import { t as o } from "./ContentMixin-Vn34n5t2.js";
|
|
4
|
+
import { t as s } from "./DynamicMarkerMixin-BS6t7w_i.js";
|
|
5
|
+
import { createBlock as c, createCommentVNode as l, createElementBlock as u, createVNode as d, openBlock as f, resolveComponent as p } from "vue";
|
|
6
|
+
import { MultiFlatmapVuer as m } from "@abi-software/flatmapvuer";
|
|
7
|
+
import "@abi-software/flatmapvuer/dist/style.css";
|
|
8
|
+
//#region src/icons/yellowstar.js
|
|
9
|
+
var h = "<svg width=\"72px\" height=\"72px\" viewBox=\"0 0 24 24\" fill=\"yellow\"><path d=\"M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z\" stroke=\"#000000\" stroke-width=\"2\"/></svg>", g = (e) => [
|
|
10
|
+
{
|
|
11
|
+
display: "Open AC Map",
|
|
12
|
+
key: "AC"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
display: "Open FC Map",
|
|
16
|
+
key: "FC"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
display: "Open 3D Human Map",
|
|
20
|
+
key: "3D"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
display: "Open Connectivity Graph",
|
|
24
|
+
key: "CG"
|
|
25
|
+
}
|
|
26
|
+
], _ = {
|
|
27
|
+
name: "MultiFlatmap",
|
|
28
|
+
mixins: [o, s],
|
|
29
|
+
components: {
|
|
30
|
+
MultiFlatmapVuer: m,
|
|
31
|
+
HelpModeDialog: e
|
|
32
|
+
},
|
|
33
|
+
data: function() {
|
|
34
|
+
return {
|
|
35
|
+
availableSpecies: r(),
|
|
36
|
+
flatmapReady: !1,
|
|
37
|
+
scaffoldResource: {},
|
|
38
|
+
showStarInLegend: !1,
|
|
39
|
+
speciesHasChanged: !1,
|
|
40
|
+
openMapOptions: g(i),
|
|
41
|
+
zoomLevel: 6
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
getState: function() {
|
|
46
|
+
if (this.flatmapReady) return this.$refs.multiflatmap.getState();
|
|
47
|
+
},
|
|
48
|
+
flatmapPanZoomCallback: function(e) {
|
|
49
|
+
if (this.mouseHovered) {
|
|
50
|
+
let t = {
|
|
51
|
+
paneIndex: this.entry.id,
|
|
52
|
+
eventType: "panZoom",
|
|
53
|
+
payload: e,
|
|
54
|
+
type: this.entry.type
|
|
55
|
+
};
|
|
56
|
+
this.$emit("resource-selected", t);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
search: function(e) {
|
|
60
|
+
return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e, !0, !0);
|
|
61
|
+
},
|
|
62
|
+
searchSuggestions: function(e, t) {
|
|
63
|
+
let n = this.$refs.multiflatmap.getCurrentFlatmap();
|
|
64
|
+
if (e && n.mapImp) {
|
|
65
|
+
let r = n.mapImp.search(e);
|
|
66
|
+
(r.__featureIds || r.featureIds).forEach((e) => {
|
|
67
|
+
let r = n.mapImp.annotation(e);
|
|
68
|
+
r && r.label && t.push(r.label);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
onPathwaySelectionChanged: function(e) {
|
|
73
|
+
let { label: t, property: n, checked: r, selectionsTitle: i } = e;
|
|
74
|
+
a.sendEvent({
|
|
75
|
+
event: "interaction_event",
|
|
76
|
+
event_name: "portal_maps_pathway_change",
|
|
77
|
+
category: t + " [" + n + "] " + r,
|
|
78
|
+
location: i
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
onSidebarAnnotationClose: function() {
|
|
82
|
+
this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().annotationEventCallback({}, { type: "aborted" });
|
|
83
|
+
},
|
|
84
|
+
onOpenPubmedUrl: function(e) {
|
|
85
|
+
a.sendEvent({
|
|
86
|
+
event: "interaction_event",
|
|
87
|
+
event_name: "portal_maps_pubmed_url",
|
|
88
|
+
file_path: e,
|
|
89
|
+
location: "map_popup_button"
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
zoomToFeatures: function(e, t) {
|
|
93
|
+
let n = e.name, r = this.getFlatmapImp();
|
|
94
|
+
if (n) {
|
|
95
|
+
let e = r.search(n);
|
|
96
|
+
e.featureIds.length > 0 ? (t && r.selectFeatures(e.featureIds), r.zoomToFeatures(e.featureIds)) : r.clearSearchResults();
|
|
97
|
+
} else r.clearSearchResults();
|
|
98
|
+
},
|
|
99
|
+
updateProvCard: function() {
|
|
100
|
+
let e = this.getFlatmapImp();
|
|
101
|
+
if (e) {
|
|
102
|
+
let t = {
|
|
103
|
+
id: this.entry.id,
|
|
104
|
+
prov: e.mapMetadata
|
|
105
|
+
};
|
|
106
|
+
n.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
contextRestored: function(e) {
|
|
110
|
+
e && (this.flatmapMarkerUpdate(e.mapImp), this.updateViewerSettings(), this.speciesHasChanged && (this.speciesHasChanged = !1, this.$emit("species-changed", this.activeSpecies)));
|
|
111
|
+
},
|
|
112
|
+
flatmapChanged: async function(e) {
|
|
113
|
+
this.activeSpecies = e, this.openMapOptions = g(e);
|
|
114
|
+
let t = this.getFlatmapImp();
|
|
115
|
+
this.updateProvCard(), t && (t.contextLost ? this.speciesHasChanged = !0 : (this.flatmapMarkerUpdate(t), this.updateViewerSettings(), this.speciesHasChanged = !1, this.$emit("species-changed", e))), a.sendEvent({
|
|
116
|
+
event: "interaction_event",
|
|
117
|
+
event_name: "portal_maps_species_change",
|
|
118
|
+
category: this.activeSpecies
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
multiFlatmapReady: function(e) {
|
|
122
|
+
if (e) {
|
|
123
|
+
e.enablePanZoomEvents(!0), this.flatmapReady = !0;
|
|
124
|
+
let t = e.mapImp;
|
|
125
|
+
this.flatmapMarkerUpdate(t), this.updateProvCard(), this.updateViewerSettings(), this.loadConnectivityExplorerConfig(e).then(() => {
|
|
126
|
+
n.emit("mapLoaded", e);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
getFlatmapImp: function() {
|
|
131
|
+
if (this.entry.type === "MultiFlatmap" && this.flatmapReady && this.$refs.multiflatmap) return this.$refs.multiflatmap.getCurrentFlatmap().mapImp;
|
|
132
|
+
},
|
|
133
|
+
flatmapAreaSearch() {
|
|
134
|
+
let e = {
|
|
135
|
+
type: "Facets",
|
|
136
|
+
label: "Unused",
|
|
137
|
+
val: this.getFlatmapImp().visibleMarkerAnatomicalIds().map((e) => this.idNamePair[e])
|
|
138
|
+
};
|
|
139
|
+
n.emit("PopoverActionClick", e);
|
|
140
|
+
},
|
|
141
|
+
flatmapIsReady() {
|
|
142
|
+
return this.flatmapReady;
|
|
143
|
+
},
|
|
144
|
+
restoreFeaturedMarkers: function(e) {
|
|
145
|
+
this.settingsStore.resetFeaturedMarkerIdentifier();
|
|
146
|
+
let t = this.settingsStore.featuredMarkers;
|
|
147
|
+
this.updateFeaturedMarkers(t, e);
|
|
148
|
+
},
|
|
149
|
+
updateFeaturedMarkers: function(e, t) {
|
|
150
|
+
this.showStarInLegend = !1;
|
|
151
|
+
for (let n = 0; n < e.length; ++n) e[n] && (this.settingsStore.featuredMarkerIdentifiers[n] || this.addFeaturedMarker(e[n], n, t) && (this.showStarInLegend = !0));
|
|
152
|
+
},
|
|
153
|
+
addFeaturedMarker: function(e, t, n) {
|
|
154
|
+
let r = this.settingsStore.featuredMarkerSpecies[t];
|
|
155
|
+
if (r && !this.activeSpecies.startsWith(r)) return !1;
|
|
156
|
+
let i = n;
|
|
157
|
+
if (i ||= this.getFlatmapImp(), i) {
|
|
158
|
+
let n = document.createElement("div");
|
|
159
|
+
n.innerHTML = h;
|
|
160
|
+
let r = i.addMarker(e, {
|
|
161
|
+
element: n,
|
|
162
|
+
className: "highlight-marker",
|
|
163
|
+
cluster: !1
|
|
164
|
+
});
|
|
165
|
+
return this.settingsStore.updateFeaturedMarkerIdentifier({
|
|
166
|
+
index: t,
|
|
167
|
+
markerIdentifier: r
|
|
168
|
+
}), !0;
|
|
169
|
+
}
|
|
170
|
+
return !1;
|
|
171
|
+
},
|
|
172
|
+
changeViewingMode: function(e) {
|
|
173
|
+
let t = this.$refs.multiflatmap?.getCurrentFlatmap();
|
|
174
|
+
t && t.changeViewingMode(e);
|
|
175
|
+
},
|
|
176
|
+
showConnectivity: function(e) {
|
|
177
|
+
if (this?.alive && this.flatmapReady && this.$refs.multiflatmap) {
|
|
178
|
+
let { featureIds: t, offset: n } = e, r = this.$refs.multiflatmap.getCurrentFlatmap();
|
|
179
|
+
r && r.moveMap(t, {
|
|
180
|
+
offsetX: n ? -150 : 0,
|
|
181
|
+
zoom: 4
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
showConnectivityTooltips: function(e) {
|
|
186
|
+
this?.alive && this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().showConnectivityTooltips(e);
|
|
187
|
+
},
|
|
188
|
+
showConnectivitiesByReference: function(e) {
|
|
189
|
+
if (this?.alive && this.flatmapReady && this.$refs.multiflatmap) {
|
|
190
|
+
let t = this.$refs.multiflatmap.getCurrentFlatmap();
|
|
191
|
+
t && t.showConnectivitiesByReference(e);
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
changeConnectivitySource: function(e, t) {
|
|
195
|
+
if (this?.alive && this.flatmapReady) {
|
|
196
|
+
let n = this.$refs.multiflatmap.getCurrentFlatmap(), r = n.mapImp.mapMetadata.uuid;
|
|
197
|
+
t.includes(r) || (t.push(r), n.changeConnectivitySource(e));
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
updateViewerSettings: function() {
|
|
201
|
+
let { backgroundDisplay: e, viewingMode: t, flightPathDisplay: n, organsDisplay: r, outlinesDisplay: i, connectionType: a } = this.settingsStore.globalSettings;
|
|
202
|
+
if (this.flatmapReady) {
|
|
203
|
+
let o = this.$refs.multiflatmap.getCurrentFlatmap();
|
|
204
|
+
o && (o.changeViewingMode(t), o.setFlightPath3D(n), o.setColour(r), o.setOutlines(i), o.backgroundChangeCallback(e), o.setConnectionType(a));
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
setVisibilityFilter: function(e) {
|
|
208
|
+
if (this?.alive && this.flatmapReady && this.$refs.multiflatmap) {
|
|
209
|
+
let t = this.$refs.multiflatmap.getCurrentFlatmap();
|
|
210
|
+
t && t.setVisibilityFilter(e);
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
getKnowledgeTooltip: async function(e) {
|
|
214
|
+
if (this?.alive && this.flatmapReady) {
|
|
215
|
+
let t = e.data[0];
|
|
216
|
+
this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(t.id, !0, !1);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
computed: {
|
|
221
|
+
facetSpecies() {
|
|
222
|
+
return this.settingsStore.facets.species;
|
|
223
|
+
},
|
|
224
|
+
featuredMarkers() {
|
|
225
|
+
return this.settingsStore.featuredMarkers;
|
|
226
|
+
},
|
|
227
|
+
displayMinimap() {
|
|
228
|
+
return this.settingsStore.displayMinimap;
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
watch: { featuredMarkers: function(e) {
|
|
232
|
+
this.flatmapReady && this.updateFeaturedMarkers(e, void 0);
|
|
233
|
+
} },
|
|
234
|
+
mounted: function() {
|
|
235
|
+
this.getFeaturedDatasets();
|
|
236
|
+
}
|
|
237
|
+
}, v = { class: "viewer-container" };
|
|
238
|
+
function y(e, t, n, r, i, a) {
|
|
239
|
+
let o = p("MultiFlatmapVuer"), s = p("HelpModeDialog");
|
|
240
|
+
return f(), u("div", v, [d(o, {
|
|
241
|
+
availableSpecies: e.availableSpecies,
|
|
242
|
+
onContextRestored: a.contextRestored,
|
|
243
|
+
onFlatmapChanged: a.flatmapChanged,
|
|
244
|
+
onReady: a.multiFlatmapReady,
|
|
245
|
+
state: e.entry.state,
|
|
246
|
+
mapManager: e.mapManager,
|
|
247
|
+
onResourceSelected: t[0] ||= (t) => e.flatmapResourceSelected(e.entry.type, t),
|
|
248
|
+
style: {
|
|
249
|
+
height: "100%",
|
|
250
|
+
width: "100%"
|
|
251
|
+
},
|
|
252
|
+
initial: e.entry.resource,
|
|
253
|
+
helpMode: e.helpMode,
|
|
254
|
+
helpModeActiveItem: e.helpModeActiveItem,
|
|
255
|
+
helpModeDialog: e.useHelpModeDialog,
|
|
256
|
+
onHelpModeLastItem: e.onHelpModeLastItem,
|
|
257
|
+
onShownTooltip: e.onTooltipShown,
|
|
258
|
+
onShownMapTooltip: e.onMapTooltipShown,
|
|
259
|
+
onAnnotationOpen: e.onAnnotationOpen,
|
|
260
|
+
onAnnotationClose: e.onAnnotationClose,
|
|
261
|
+
onUpdateOfflineAnnotationEnabled: e.updateOfflineAnnotationEnabled,
|
|
262
|
+
annotationSidebar: e.annotationSidebar,
|
|
263
|
+
onConnectivityInfoOpen: e.onConnectivityInfoOpen,
|
|
264
|
+
onConnectivityError: e.onConnectivityError,
|
|
265
|
+
onConnectivityInfoClose: e.onConnectivityInfoClose,
|
|
266
|
+
onNeuronConnectionFeatureClick: e.onNeuronConnectionFeatureClick,
|
|
267
|
+
connectivityInfoSidebar: e.connectivityInfoSidebar,
|
|
268
|
+
ref: "multiflatmap",
|
|
269
|
+
displayMinimap: a.displayMinimap,
|
|
270
|
+
showStarInLegend: e.showStarInLegend,
|
|
271
|
+
enableOpenMapUI: !0,
|
|
272
|
+
openMapOptions: e.openMapOptions,
|
|
273
|
+
flatmapAPI: e.flatmapAPI,
|
|
274
|
+
render: e.visible,
|
|
275
|
+
sparcAPI: e.apiLocation,
|
|
276
|
+
showLocalSettings: e.showLocalSettings,
|
|
277
|
+
showOpenMapButton: e.showOpenMapButton,
|
|
278
|
+
onPanZoomCallback: a.flatmapPanZoomCallback,
|
|
279
|
+
onOpenMap: e.openMap,
|
|
280
|
+
onFinishHelpMode: e.endHelp,
|
|
281
|
+
onPathwaySelectionChanged: a.onPathwaySelectionChanged,
|
|
282
|
+
onOpenPubmedUrl: a.onOpenPubmedUrl,
|
|
283
|
+
onMapmanagerLoaded: e.onMapmanagerLoaded,
|
|
284
|
+
showPathwayFilter: !1,
|
|
285
|
+
tooltipContentProvider: e.tooltipPathLabelProvider,
|
|
286
|
+
onTrackEvent: e.trackEvent
|
|
287
|
+
}, null, 8, /* @__PURE__ */ "availableSpecies.onContextRestored.onFlatmapChanged.onReady.state.mapManager.initial.helpMode.helpModeActiveItem.helpModeDialog.onHelpModeLastItem.onShownTooltip.onShownMapTooltip.onAnnotationOpen.onAnnotationClose.onUpdateOfflineAnnotationEnabled.annotationSidebar.onConnectivityInfoOpen.onConnectivityError.onConnectivityInfoClose.onNeuronConnectionFeatureClick.connectivityInfoSidebar.displayMinimap.showStarInLegend.openMapOptions.flatmapAPI.render.sparcAPI.showLocalSettings.showOpenMapButton.onPanZoomCallback.onOpenMap.onFinishHelpMode.onPathwaySelectionChanged.onOpenPubmedUrl.onMapmanagerLoaded.tooltipContentProvider.onTrackEvent".split(".")), e.helpMode && e.useHelpModeDialog ? (f(), c(s, {
|
|
288
|
+
key: 0,
|
|
289
|
+
ref: "multiflatmapHelp",
|
|
290
|
+
multiflatmapRef: e.multiflatmapRef,
|
|
291
|
+
lastItem: e.helpModeLastItem,
|
|
292
|
+
onShowNext: e.onHelpModeShowNext,
|
|
293
|
+
onFinishHelpMode: e.onFinishHelpMode
|
|
294
|
+
}, null, 8, [
|
|
295
|
+
"multiflatmapRef",
|
|
296
|
+
"lastItem",
|
|
297
|
+
"onShowNext",
|
|
298
|
+
"onFinishHelpMode"
|
|
299
|
+
])) : l("", !0)]);
|
|
300
|
+
}
|
|
301
|
+
var b = /*#__PURE__*/ t(_, [["render", y], ["__scopeId", "data-v-f3920392"]]);
|
|
302
|
+
//#endregion
|
|
303
|
+
export { b as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { _ as e } from "./connectivities-UXTqf7_0.js";
|
|
2
|
+
import { t } from "./ContentMixin-Vn34n5t2.js";
|
|
3
|
+
import { createBlock as n, openBlock as r, resolveComponent as i } from "vue";
|
|
4
|
+
import { PlotVuer as a } from "@abi-software/plotvuer";
|
|
5
|
+
import "@abi-software/plotvuer/dist/style.css";
|
|
6
|
+
//#region src/components/viewers/Plot.vue
|
|
7
|
+
var o = {
|
|
8
|
+
name: "Plot",
|
|
9
|
+
mixins: [t],
|
|
10
|
+
components: { PlotVuer: a }
|
|
11
|
+
};
|
|
12
|
+
function s(e, t, a, o, s, c) {
|
|
13
|
+
let l = i("PlotVuer");
|
|
14
|
+
return r(), n(l, {
|
|
15
|
+
"data-source": e.entry.resource.dataSource,
|
|
16
|
+
metadata: e.entry.resource.metadata,
|
|
17
|
+
"supplemental-data": e.entry.resource.supplementalData,
|
|
18
|
+
style: { overflow: "hidden" },
|
|
19
|
+
ref: "plot"
|
|
20
|
+
}, null, 8, [
|
|
21
|
+
"data-source",
|
|
22
|
+
"metadata",
|
|
23
|
+
"supplemental-data"
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
var c = /*#__PURE__*/ e(o, [["render", s]]);
|
|
27
|
+
//#endregion
|
|
28
|
+
export { c as default };
|