@abi-software/mapintegratedvuer 1.17.3 → 1.17.4
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/{ConnectivityGraph-CKIf0I87.js → ConnectivityGraph-CNtSLKGZ.js} +19 -21
- package/dist/{ContentMixin-NLNFG_hM.js → ContentMixin-BImmmP1E.js} +167 -198
- package/dist/{Flatmap-DHIsuG3u.js → Flatmap-CakK_75H.js} +3 -3
- package/dist/{Iframe-CGY2MkCp.js → Iframe-C7E9XJu7.js} +2 -2
- package/dist/{MultiFlatmap-DMu4KUod.js → MultiFlatmap-DnDXuvTw.js} +3 -3
- package/dist/{Plot-BAew77Nh.js → Plot-CxCj3uTj.js} +2 -2
- package/dist/Scaffold-D1NyLNzW.js +304 -0
- package/dist/{Simulation-BJx5DtiY.js → Simulation-Br3Grrd6.js} +2 -2
- package/dist/{index-CgeNF-PU.js → index-qyfmiqHe.js} +18648 -18794
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +177 -174
- package/dist/{style-CCOYYK7g.js → style-DezYtA61.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/SplitDialog.vue +0 -1
- package/src/components/SplitFlow.vue +1 -0
- package/src/components/viewers/ConnectivityGraph.vue +1 -9
- package/src/components/viewers/Scaffold.vue +130 -78
- package/src/mixins/ContentMixin.js +9 -60
- package/src/stores/connectivities.js +10 -1
- package/dist/Scaffold-CB4NmIv6.js +0 -284
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
import { _ as g, z as m, E as d, g as v, b as y } from "./index-CgeNF-PU.js";
|
|
2
|
-
import { C as w } from "./ContentMixin-NLNFG_hM.js";
|
|
3
|
-
import { ScaffoldVuer as b } from "@abi-software/scaffoldvuer";
|
|
4
|
-
import { resolveComponent as p, openBlock as u, createElementBlock as S, createVNode as M, createBlock as N, createCommentVNode as $ } from "vue";
|
|
5
|
-
const C = {
|
|
6
|
-
name: "Scaffold",
|
|
7
|
-
mixins: [w],
|
|
8
|
-
components: {
|
|
9
|
-
ScaffoldVuer: b,
|
|
10
|
-
HelpModeDialog: m
|
|
11
|
-
},
|
|
12
|
-
methods: {
|
|
13
|
-
showConnectivitiesByReference: async function(e) {
|
|
14
|
-
const t = sessionStorage.getItem("flatmap-knowledge");
|
|
15
|
-
let n = [];
|
|
16
|
-
t ? n = await v(e) : n = await y(this.flatmapService.mapImp, e, this.flatmapService.flatmapQueries);
|
|
17
|
-
const o = [];
|
|
18
|
-
for (const s of n) {
|
|
19
|
-
const i = this.nervesKnowledge.find((l) => l.id === s);
|
|
20
|
-
if (!i) continue;
|
|
21
|
-
const f = i["nerve-label"];
|
|
22
|
-
if (f) {
|
|
23
|
-
const l = f.flatMap((a) => a.subNerves);
|
|
24
|
-
o.push(...l);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
this.$refs.scaffold.changeHighlightedByName(o, "", !1);
|
|
28
|
-
},
|
|
29
|
-
setNerveGreyScale: function() {
|
|
30
|
-
if (this.nervesKnowledge.length) {
|
|
31
|
-
const t = this.nervesKnowledge.reduce((n, o) => n.concat(o["nerve-label"] || []), []).reduce((n, o) => n.concat(o.subNerves || []), []);
|
|
32
|
-
this.$refs.scaffold.setGreyScale(!0, t);
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
setVisibilityFilter: function(e) {
|
|
36
|
-
let t = [];
|
|
37
|
-
const n = !!e;
|
|
38
|
-
if (e) {
|
|
39
|
-
const o = [];
|
|
40
|
-
e.OR.forEach((s) => {
|
|
41
|
-
"AND" in s && s.AND.length >= 2 && "models" in s.AND[1] && o.push(...s.AND[1].models);
|
|
42
|
-
});
|
|
43
|
-
for (const s of o) {
|
|
44
|
-
const i = this.nervesKnowledge.find((f) => f.id === s);
|
|
45
|
-
if (i) {
|
|
46
|
-
const f = i["nerve-label"].map((l) => l.subNerves).flat(1 / 0);
|
|
47
|
-
t.push(...f);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
this.$refs.scaffold.zoomToNerves(t, n);
|
|
52
|
-
},
|
|
53
|
-
syncFilter: function(e) {
|
|
54
|
-
this.$refs.scaffold.viewingMode === "Neuron Connection" && (this.filter = e.filter((t) => {
|
|
55
|
-
var n;
|
|
56
|
-
return ((n = t.facet) == null ? void 0 : n.toLowerCase()) !== "show all";
|
|
57
|
-
}));
|
|
58
|
-
},
|
|
59
|
-
scaffoldResourceSelected: async function(e, t) {
|
|
60
|
-
if (this.resourceSelected(e, t, !0), t.length === 1) {
|
|
61
|
-
if (this.clickedObject = t[0].data, this.clickedObject.isNerves || this.clickedObject.anatomicalId) {
|
|
62
|
-
const n = this.clickedObject.id.toLowerCase();
|
|
63
|
-
if (this.$refs.scaffold.viewingMode === "Neuron Connection") {
|
|
64
|
-
const o = this.settingsStore.globalSettings.connectionType;
|
|
65
|
-
if (this.clickedObject.isNerves)
|
|
66
|
-
this.filter.push({
|
|
67
|
-
facet: n,
|
|
68
|
-
term: "Nerves",
|
|
69
|
-
facetPropPath: "scaffold.connectivity.nerve"
|
|
70
|
-
});
|
|
71
|
-
else {
|
|
72
|
-
const s = o.toLowerCase();
|
|
73
|
-
let i = this.clickedObject.anatomicalId || "";
|
|
74
|
-
if (i)
|
|
75
|
-
this.filter.push({
|
|
76
|
-
facet: `["${i}",[]]`,
|
|
77
|
-
facetPropPath: `flatmap.connectivity.source.${s}`,
|
|
78
|
-
tagLabel: n.charAt(0).toUpperCase() + n.slice(1),
|
|
79
|
-
term: o
|
|
80
|
-
});
|
|
81
|
-
else {
|
|
82
|
-
const l = this.connectivitiesStore.filterOptions[this.entry.resource].find((r) => r.key === `flatmap.connectivity.source.${s}`);
|
|
83
|
-
let a;
|
|
84
|
-
l == null || l.children.forEach((r) => {
|
|
85
|
-
var c;
|
|
86
|
-
r.label.toLowerCase() === n && (a = r), (c = r.children) == null || c.forEach((h) => {
|
|
87
|
-
h.label.toLowerCase() === n && (a = h);
|
|
88
|
-
});
|
|
89
|
-
}), a && (i = a.key.replace(`flatmap.connectivity.source.${s}.`, ""), this.filter.push({
|
|
90
|
-
facet: i,
|
|
91
|
-
facetPropPath: `flatmap.connectivity.source.${s}`,
|
|
92
|
-
tagLabel: a.tagLabel,
|
|
93
|
-
term: o
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
d.emit("neuron-connection-feature-click", {
|
|
98
|
-
filters: this.filter,
|
|
99
|
-
search: this.filter.length ? "" : n
|
|
100
|
-
});
|
|
101
|
-
} else if (this.$refs.scaffold.viewingMode === "Exploration") {
|
|
102
|
-
const o = this.nervesKnowledge.filter((s) => JSON.stringify(s["nerve-label"]).includes(n));
|
|
103
|
-
o.length && this.getKnowledgeTooltip({ data: o, type: this.entry });
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
} else t.length > 1 ? this.$refs.scaffold.viewingMode === "Exploration" && this.clickedObject && this.$refs.scaffold.$module.setIgnorePicking(!1) : (this.clickedObject = void 0, d.emit("connectivity-info-close"));
|
|
107
|
-
},
|
|
108
|
-
onResize: function() {
|
|
109
|
-
this.scaffoldCamera.onResize();
|
|
110
|
-
},
|
|
111
|
-
getState: function() {
|
|
112
|
-
return this.$refs.scaffold.getState();
|
|
113
|
-
},
|
|
114
|
-
/**
|
|
115
|
-
* Perform a local search on this contentvuer
|
|
116
|
-
*/
|
|
117
|
-
search: function(e) {
|
|
118
|
-
return this.$refs.scaffold.search(e, !0);
|
|
119
|
-
},
|
|
120
|
-
searchSuggestions: function(e, t) {
|
|
121
|
-
if (e === "" || !this.$refs.scaffold)
|
|
122
|
-
return t;
|
|
123
|
-
this.$refs.scaffold.fetchSuggestions(e).forEach((o) => {
|
|
124
|
-
o.suggestion && t.push(o.suggestion);
|
|
125
|
-
});
|
|
126
|
-
},
|
|
127
|
-
showConnectivityTooltips: function(e) {
|
|
128
|
-
if (e.label)
|
|
129
|
-
this.$refs.scaffold.changeHighlightedByName([e.label], "", !1), this.$refs.scaffold.showRegionTooltip(e.label, !1, !1);
|
|
130
|
-
else {
|
|
131
|
-
const t = e.connectivityInfo["nerve-label"];
|
|
132
|
-
if (t) {
|
|
133
|
-
const n = t.flatMap((o) => o.subNerves);
|
|
134
|
-
this.$refs.scaffold.changeHighlightedByName(n, "", !1);
|
|
135
|
-
}
|
|
136
|
-
this.$refs.scaffold.hideRegionTooltip();
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
zoomToFeatures: function(e, t) {
|
|
140
|
-
let n;
|
|
141
|
-
Array.isArray(e) ? n = e : n = [e.name], t && this.$refs.scaffold.changeActiveByName(n, "", !1), this.$refs.scaffold.viewRegion(n);
|
|
142
|
-
},
|
|
143
|
-
scaffoldIsReady: function() {
|
|
144
|
-
this.scaffoldLoaded = !0, this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1], this.visible && this.entry.rotation && this.entry.rotation, this.updateViewerSettings(), d.emit("mapLoaded", this.$refs.scaffold), setTimeout(() => {
|
|
145
|
-
this.setNerveGreyScale();
|
|
146
|
-
}, 500);
|
|
147
|
-
},
|
|
148
|
-
/**
|
|
149
|
-
* Callback when the vuers emit a selected event.
|
|
150
|
-
*/
|
|
151
|
-
scaffoldHighlighted: function(e, t) {
|
|
152
|
-
var o, s, i;
|
|
153
|
-
const n = {
|
|
154
|
-
paneIndex: this.entry.id,
|
|
155
|
-
type: e,
|
|
156
|
-
resource: t,
|
|
157
|
-
internalName: void 0
|
|
158
|
-
};
|
|
159
|
-
t && t[0] && ((((o = t[0].data) == null ? void 0 : o.id) === void 0 || ((s = t[0].data) == null ? void 0 : s.id) === "") && (t[0].data.id = (i = t[0].data) == null ? void 0 : i.group), n.internalName = t[0].data.id, n.eventType = "highlighted"), this.$emit("resource-selected", n);
|
|
160
|
-
},
|
|
161
|
-
/**
|
|
162
|
-
* Callback when the vuers emit a selected event.
|
|
163
|
-
*/
|
|
164
|
-
scaffoldNavigated: function(e, t) {
|
|
165
|
-
if (this.mouseHovered) {
|
|
166
|
-
const n = {
|
|
167
|
-
paneIndex: this.entry.id,
|
|
168
|
-
eventType: "panZoom",
|
|
169
|
-
payload: t,
|
|
170
|
-
type: e
|
|
171
|
-
};
|
|
172
|
-
this.$emit("resource-selected", n);
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
updateWithViewUrl: function(e) {
|
|
176
|
-
this.$refs.scaffold.updateViewURL(e);
|
|
177
|
-
},
|
|
178
|
-
/**
|
|
179
|
-
* Change the view mode of the current scaffold
|
|
180
|
-
*/
|
|
181
|
-
changeViewingMode: function(e) {
|
|
182
|
-
this.$refs.scaffold.changeViewingMode(e);
|
|
183
|
-
},
|
|
184
|
-
updateViewerSettings: function() {
|
|
185
|
-
const {
|
|
186
|
-
backgroundDisplay: e,
|
|
187
|
-
organsDisplay: t,
|
|
188
|
-
outlinesDisplay: n,
|
|
189
|
-
viewingMode: o
|
|
190
|
-
} = this.settingsStore.globalSettings;
|
|
191
|
-
this.$refs.scaffold.backgroundChangeCallback(e), this.$refs.scaffold.changeViewingMode(o), this.$refs.scaffold.setColour(t), this.$refs.scaffold.setOutlines(n);
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
computed: {
|
|
195
|
-
warningMessage: function() {
|
|
196
|
-
return this.entry.discoverId === "307" || this.entry.discoverId === 307 ? "This map displays the anatomical location and connectivity of nerves, through which the neuron populations from the ApiNATOMY models available in SCKAN can be routed." : "Under active development";
|
|
197
|
-
},
|
|
198
|
-
markerLabels: function() {
|
|
199
|
-
return this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.numberOfDatasetsForFacets : {};
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
watch: {
|
|
203
|
-
connectivityKnowledge: {
|
|
204
|
-
handler(e, t) {
|
|
205
|
-
if (this.entry.resource in e) {
|
|
206
|
-
const n = e[this.entry.resource];
|
|
207
|
-
n.length !== this.nervesKnowledge.length && (this.nervesKnowledge = n, this.scaffoldLoaded && this.setNerveGreyScale());
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
deep: !0,
|
|
211
|
-
immediate: !0
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
data: function() {
|
|
215
|
-
return {
|
|
216
|
-
apiLocation: process.env.VUE_APP_API_LOCATION,
|
|
217
|
-
scaffoldCamera: void 0,
|
|
218
|
-
scaffoldLoaded: !1,
|
|
219
|
-
nervesKnowledge: [],
|
|
220
|
-
clickedObject: void 0,
|
|
221
|
-
filter: [],
|
|
222
|
-
query: ""
|
|
223
|
-
};
|
|
224
|
-
},
|
|
225
|
-
mounted: function() {
|
|
226
|
-
this.scaffoldCamera = this.$refs.scaffold.$module.scene.getZincCameraControls();
|
|
227
|
-
}
|
|
228
|
-
}, I = { class: "viewer-container" };
|
|
229
|
-
function O(e, t, n, o, s, i) {
|
|
230
|
-
const f = p("ScaffoldVuer"), l = p("HelpModeDialog");
|
|
231
|
-
return u(), S("div", I, [
|
|
232
|
-
M(f, {
|
|
233
|
-
state: e.entry.state,
|
|
234
|
-
url: e.entry.resource,
|
|
235
|
-
region: e.entry.region,
|
|
236
|
-
onScaffoldSelected: t[0] || (t[0] = (a) => i.scaffoldResourceSelected(e.entry.type, a)),
|
|
237
|
-
onScaffoldHighlighted: t[1] || (t[1] = (a) => i.scaffoldHighlighted(e.entry.type, a)),
|
|
238
|
-
onScaffoldNavigated: t[2] || (t[2] = (a) => i.scaffoldNavigated(e.entry.type, a)),
|
|
239
|
-
onOnReady: i.scaffoldIsReady,
|
|
240
|
-
onOpenMap: e.openMap,
|
|
241
|
-
ref: "scaffold",
|
|
242
|
-
"background-toggle": !0,
|
|
243
|
-
traditional: !0,
|
|
244
|
-
helpMode: e.helpMode,
|
|
245
|
-
helpModeActiveItem: e.helpModeActiveItem,
|
|
246
|
-
helpModeDialog: e.useHelpModeDialog,
|
|
247
|
-
onAnnotationOpen: e.onAnnotationOpen,
|
|
248
|
-
onAnnotationClose: e.onAnnotationClose,
|
|
249
|
-
onUpdateOfflineAnnotationEnabled: e.updateOfflineAnnotationEnabled,
|
|
250
|
-
annotationSidebar: e.annotationSidebar,
|
|
251
|
-
onHelpModeLastItem: e.onHelpModeLastItem,
|
|
252
|
-
onShownTooltip: e.onTooltipShown,
|
|
253
|
-
onShownMapTooltip: e.onMapTooltipShown,
|
|
254
|
-
render: e.visible,
|
|
255
|
-
"display-latest-message": !0,
|
|
256
|
-
"warning-message": i.warningMessage,
|
|
257
|
-
"display-minimap": !1,
|
|
258
|
-
"display-markers": !1,
|
|
259
|
-
enableOpenMapUI: !0,
|
|
260
|
-
"view-u-r-l": e.entry.viewUrl,
|
|
261
|
-
markerCluster: !0,
|
|
262
|
-
markerLabels: i.markerLabels,
|
|
263
|
-
flatmapAPI: e.flatmapAPI,
|
|
264
|
-
showLocalSettings: e.showLocalSettings,
|
|
265
|
-
showOpenMapButton: e.showOpenMapButton,
|
|
266
|
-
usageConfig: {
|
|
267
|
-
showTubeLinesControls: !1,
|
|
268
|
-
tubeLines: e.entry.discoverId === "307" || e.entry.discoverId === 307
|
|
269
|
-
}
|
|
270
|
-
}, null, 8, ["state", "url", "region", "onOnReady", "onOpenMap", "helpMode", "helpModeActiveItem", "helpModeDialog", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "render", "warning-message", "view-u-r-l", "markerLabels", "flatmapAPI", "showLocalSettings", "showOpenMapButton", "usageConfig"]),
|
|
271
|
-
e.helpMode && e.useHelpModeDialog ? (u(), N(l, {
|
|
272
|
-
key: 0,
|
|
273
|
-
ref: "scaffoldHelp",
|
|
274
|
-
scaffoldRef: e.scaffoldRef,
|
|
275
|
-
lastItem: e.helpModeLastItem,
|
|
276
|
-
onShowNext: e.onHelpModeShowNext,
|
|
277
|
-
onFinishHelpMode: e.onFinishHelpMode
|
|
278
|
-
}, null, 8, ["scaffoldRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : $("", !0)
|
|
279
|
-
]);
|
|
280
|
-
}
|
|
281
|
-
const H = /* @__PURE__ */ g(C, [["render", O], ["__scopeId", "data-v-5de11cee"]]);
|
|
282
|
-
export {
|
|
283
|
-
H as default
|
|
284
|
-
};
|