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