@abi-software/mapintegratedvuer 1.22.0 → 1.24.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.
Files changed (39) hide show
  1. package/dist/{ConnectivityGraph-BBZ3Dgat.js → ConnectivityGraph-CCxk8vcE.js} +6 -6
  2. package/dist/{ContentMixin-B-O_IwPg.js → ContentMixin-Db8nqZax.js} +303 -247
  3. package/dist/{DynamicMarkerMixin-B9iqtP_f.js → DynamicMarkerMixin-LB2RYdSY.js} +1 -1
  4. package/dist/{Flatmap-BoEFI50b.js → Flatmap-CqUzOkdl.js} +5 -5
  5. package/dist/{Iframe-Slj-LQTF.js → Iframe-I-xdZ2FP.js} +2 -2
  6. package/dist/{MultiFlatmap-l6aBn6x3.js → MultiFlatmap-11L97ycJ.js} +6 -6
  7. package/dist/{Plot-CIhEip5b.js → Plot-Bd9RqyVD.js} +2 -2
  8. package/dist/{Scaffold-D5ZGCDvt.js → Scaffold-CySWXQxI.js} +46 -36
  9. package/dist/Simulation-ChUbGudZ.js +32 -0
  10. package/dist/{connectivities-Br3MpoAv.js → connectivities-LtlFwLOp.js} +6399 -5790
  11. package/dist/es-D-YkSGXX.js +436 -0
  12. package/dist/mapintegratedvuer.js +13061 -11664
  13. package/dist/mapintegratedvuer.umd.cjs +191 -190
  14. package/dist/style.css +1 -1
  15. package/package.json +7 -7
  16. package/src/assets/header-icon.scss +9 -3
  17. package/src/components/ContentBar.vue +172 -92
  18. package/src/components/ContentVuer.vue +41 -1
  19. package/src/components/ContextCard.vue +15 -3
  20. package/src/components/DatasetHeader.vue +4 -1
  21. package/src/components/DialogToolbarContent.vue +45 -4
  22. package/src/components/EventBus.js +8 -0
  23. package/src/components/MapContent.vue +85 -31
  24. package/src/components/ResizeSensor.vue +7 -9
  25. package/src/components/ScreenshotPopover.vue +526 -0
  26. package/src/components/SplitDialog.vue +94 -93
  27. package/src/components/SplitFlow.vue +158 -96
  28. package/src/components/scripts/utilities.js +56 -1
  29. package/src/components/viewers/Flatmap.vue +1 -0
  30. package/src/components/viewers/MultiFlatmap.vue +3 -0
  31. package/src/components/viewers/Scaffold.vue +25 -13
  32. package/src/components/viewers/Simulation.vue +23 -1
  33. package/src/components.d.ts +2 -0
  34. package/src/mixins/ContentMixin.js +23 -10
  35. package/src/services/screenshot.js +1186 -0
  36. package/src/stores/connectivities.js +38 -5
  37. package/src/stores/settings.js +18 -0
  38. package/vite.config.js +27 -4
  39. package/dist/Simulation-C5o5DXRb.js +0 -25
@@ -1,4 +1,4 @@
1
- import { v as e } from "./connectivities-Br3MpoAv.js";
1
+ import { I as e } from "./connectivities-LtlFwLOp.js";
2
2
  import { mapStores as t } from "pinia";
3
3
  //#region src/mixins/DynamicMarkerMixin.js
4
4
  var n = function(e) {
@@ -1,7 +1,7 @@
1
- import { C as e, _ as t, b as n, y as r } from "./connectivities-Br3MpoAv.js";
1
+ import { C as e, F as t, b as n, y as r } from "./connectivities-LtlFwLOp.js";
2
2
  import "./mapintegratedvuer.js";
3
- import { t as i } from "./ContentMixin-B-O_IwPg.js";
4
- import { t as a } from "./DynamicMarkerMixin-B9iqtP_f.js";
3
+ import { t as i } from "./ContentMixin-Db8nqZax.js";
4
+ import { t as a } from "./DynamicMarkerMixin-LB2RYdSY.js";
5
5
  import { createBlock as o, createCommentVNode as s, createElementBlock as c, createVNode as l, openBlock as u, resolveComponent as d } from "vue";
6
6
  import { FlatmapVuer as f } from "@abi-software/flatmapvuer";
7
7
  import "@abi-software/flatmapvuer/dist/style.css";
@@ -33,7 +33,7 @@ var p = {
33
33
  this.flatmapReadyForMarkerUpdates(e), this.updateViewerSettings();
34
34
  },
35
35
  flatmapReadyCall: function(e) {
36
- this.flatmapReady = !0;
36
+ this.flatmapReady = !0, this.$emit("viewer-ready", !0);
37
37
  let t = this.getFlatmapImp();
38
38
  t?.mapMetadata?.name && (this.updateEntryLabel(t?.mapMetadata?.name), this.updateEntryTitle(t?.mapMetadata?.name));
39
39
  let r = {
@@ -188,6 +188,6 @@ function h(e, t, n, r, i, a) {
188
188
  "onFinishHelpMode"
189
189
  ])) : s("", !0)]);
190
190
  }
191
- var g = /*#__PURE__*/ t(p, [["render", h], ["__scopeId", "data-v-66e1b763"]]);
191
+ var g = /*#__PURE__*/ t(p, [["render", h], ["__scopeId", "data-v-43840a36"]]);
192
192
  //#endregion
193
193
  export { g as default };
@@ -1,5 +1,5 @@
1
- import { _ as e } from "./connectivities-Br3MpoAv.js";
2
- import { t } from "./ContentMixin-B-O_IwPg.js";
1
+ import { F as e } from "./connectivities-LtlFwLOp.js";
2
+ import { t } from "./ContentMixin-Db8nqZax.js";
3
3
  import { createElementBlock as n, createElementVNode as r, openBlock as i } from "vue";
4
4
  //#region src/components/viewers/Iframe.vue
5
5
  var a = {
@@ -1,7 +1,7 @@
1
- import { C as e, _ as t, b as n, c as r, u as i, y as a } from "./connectivities-Br3MpoAv.js";
1
+ import { C as e, F as t, b as n, c as r, u as i, y as a } from "./connectivities-LtlFwLOp.js";
2
2
  import "./mapintegratedvuer.js";
3
- import { t as o } from "./ContentMixin-B-O_IwPg.js";
4
- import { t as s } from "./DynamicMarkerMixin-B9iqtP_f.js";
3
+ import { t as o } from "./ContentMixin-Db8nqZax.js";
4
+ import { t as s } from "./DynamicMarkerMixin-LB2RYdSY.js";
5
5
  import { createBlock as c, createCommentVNode as l, createElementBlock as u, createVNode as d, openBlock as f, resolveComponent as p } from "vue";
6
6
  import { MultiFlatmapVuer as m } from "@abi-software/flatmapvuer";
7
7
  import "@abi-software/flatmapvuer/dist/style.css";
@@ -121,7 +121,7 @@ var h = "<svg width=\"72px\" height=\"72px\" viewBox=\"0 0 24 24\" fill=\"yellow
121
121
  e && (this.flatmapMarkerUpdate(e.mapImp), this.updateViewerSettings(), this.speciesHasChanged && (this.speciesHasChanged = !1, this.$emit("species-changed", this.activeSpecies)));
122
122
  },
123
123
  flatmapChanged: async function(e) {
124
- this.activeSpecies = e, this.openMapOptions = g(e);
124
+ this.activeSpecies = e, this.openMapOptions = g(e), this.$emit("viewer-ready", !!this.$refs.multiflatmap?.getCurrentFlatmap()?.mapImp);
125
125
  let t = this.getFlatmapImp();
126
126
  this.updateProvCard(), t && (t.contextLost ? this.speciesHasChanged = !0 : (this.flatmapMarkerUpdate(t), this.updateViewerSettings(), this.speciesHasChanged = !1, this.$emit("species-changed", e))), a.sendEvent({
127
127
  event: "interaction_event",
@@ -131,7 +131,7 @@ var h = "<svg width=\"72px\" height=\"72px\" viewBox=\"0 0 24 24\" fill=\"yellow
131
131
  },
132
132
  multiFlatmapReady: function(e) {
133
133
  if (e) {
134
- e.enablePanZoomEvents(!0), this.flatmapReady = !0;
134
+ e.enablePanZoomEvents(!0), this.flatmapReady = !0, this.$emit("viewer-ready", !0);
135
135
  let t = e.mapImp;
136
136
  this.flatmapMarkerUpdate(t), this.updateProvCard(), this.updateViewerSettings(), this.loadConnectivityExplorerConfig(e).then(() => {
137
137
  n.emit("mapLoaded", e);
@@ -310,6 +310,6 @@ function y(e, t, n, r, i, a) {
310
310
  "onFinishHelpMode"
311
311
  ])) : l("", !0)]);
312
312
  }
313
- var b = /*#__PURE__*/ t(_, [["render", y], ["__scopeId", "data-v-6beb85ff"]]);
313
+ var b = /*#__PURE__*/ t(_, [["render", y], ["__scopeId", "data-v-ffd110a2"]]);
314
314
  //#endregion
315
315
  export { b as default };
@@ -1,5 +1,5 @@
1
- import { _ as e } from "./connectivities-Br3MpoAv.js";
2
- import { t } from "./ContentMixin-B-O_IwPg.js";
1
+ import { F as e } from "./connectivities-LtlFwLOp.js";
2
+ import { t } from "./ContentMixin-Db8nqZax.js";
3
3
  import { createBlock as n, openBlock as r, resolveComponent as i } from "vue";
4
4
  import { PlotVuer as a } from "@abi-software/plotvuer";
5
5
  import "@abi-software/plotvuer/dist/style.css";
@@ -1,33 +1,33 @@
1
- import { C as e, _ as t, a as n, b as r, o as i } from "./connectivities-Br3MpoAv.js";
1
+ import { C as e, F as t, W as n, a as r, b as i, o as a } from "./connectivities-LtlFwLOp.js";
2
2
  import "./mapintegratedvuer.js";
3
- import { t as a } from "./ContentMixin-B-O_IwPg.js";
4
- import { createBlock as o, createCommentVNode as s, createElementBlock as c, markRaw as l, openBlock as u, resolveComponent as d } from "vue";
5
- import { ScaffoldVuer as f } from "@abi-software/scaffoldvuer";
3
+ import { t as o } from "./ContentMixin-Db8nqZax.js";
4
+ import { createBlock as s, createCommentVNode as c, createElementBlock as l, markRaw as u, openBlock as d, resolveComponent as f } from "vue";
5
+ import { ScaffoldVuer as p } from "@abi-software/scaffoldvuer";
6
6
  import "@abi-software/scaffoldvuer/dist/style.css";
7
7
  //#region src/components/viewers/Scaffold.vue
8
- var p = {
8
+ var m = {
9
9
  name: "Scaffold",
10
- mixins: [a],
10
+ mixins: [o],
11
11
  components: {
12
- ScaffoldVuer: f,
12
+ ScaffoldVuer: p,
13
13
  HelpModeDialog: e
14
14
  },
15
15
  methods: {
16
16
  showConnectivitiesByReference: async function(e) {
17
17
  if (this.$refs.scaffold) {
18
- let t = sessionStorage.getItem("flatmap-knowledge"), r;
19
- r = t ? await i(e) : await n(this.flatmapService.mapImp, e, this.flatmapService.flatmapQueries);
20
- let a = [];
21
- for (let e of r) {
18
+ let t = sessionStorage.getItem("flatmap-knowledge"), n;
19
+ n = t ? await a(e) : await r(this.flatmapService.mapImp, e, this.flatmapService.flatmapQueries);
20
+ let i = [];
21
+ for (let e of n) {
22
22
  let t = this.nervesKnowledge.find((t) => t.id === e);
23
23
  if (!t) continue;
24
24
  let n = t["nerve-label"];
25
25
  if (n) {
26
26
  let e = n.flatMap((e) => e.subNerves);
27
- a.push(...e);
27
+ i.push(...e);
28
28
  }
29
29
  }
30
- this.$refs.scaffold.changeHighlightedByName(a, "", !1);
30
+ this.$refs.scaffold.changeHighlightedByName(i, "", !1);
31
31
  }
32
32
  },
33
33
  setNerveGreyScale: function() {
@@ -60,7 +60,12 @@ var p = {
60
60
  },
61
61
  scaffoldResourceSelected: async function(e, t) {
62
62
  if (this.resourceSelected(e, t, !0), t.length === 1) {
63
- if (this.clickedObject = t[0].data, this.clickedObject.isNerves || this.clickedObject.anatomicalId) {
63
+ let { id: e, isNerves: n, anatomicalId: r } = t[0].data;
64
+ if (this.clickedObject = {
65
+ id: e,
66
+ isNerves: n,
67
+ anatomicalId: r
68
+ }, this.clickedObject.isNerves || this.clickedObject.anatomicalId) {
64
69
  let e = this.clickedObject.id.toLowerCase();
65
70
  if (this.$refs.scaffold.viewingMode === "Neuron Connection") {
66
71
  let t = this.settingsStore.globalSettings.connectionType;
@@ -91,7 +96,7 @@ var p = {
91
96
  }));
92
97
  }
93
98
  }
94
- r.emit("neuron-connection-feature-click", {
99
+ i.emit("neuron-connection-feature-click", {
95
100
  filters: this.filter,
96
101
  search: this.filter.length ? "" : e
97
102
  });
@@ -103,10 +108,14 @@ var p = {
103
108
  });
104
109
  }
105
110
  }
106
- } else t.length > 1 ? this.$refs.scaffold.viewingMode === "Exploration" && this.clickedObject && this.$refs.scaffold.$module.setIgnorePicking(!1) : (this.clickedObject = void 0, r.emit("connectivity-info-close"));
111
+ } else t.length > 1 ? this.$refs.scaffold.viewingMode === "Exploration" && this.clickedObject && this.$refs.scaffold.$module.setIgnorePicking(!1) : (this.clickedObject = void 0, i.emit("connectivity-info-close"));
107
112
  },
108
113
  onResize: function() {
109
- this.scaffoldCamera ||= l(this.$refs.scaffold?.$module?.scene?.getZincCameraControls()), this.scaffoldCamera && this.scaffoldCamera.onResize();
114
+ this.scaffoldCamera ||= u(this.$refs.scaffold?.$module?.scene?.getZincCameraControls()), this.scaffoldCamera && this.scaffoldCamera.onResize();
115
+ },
116
+ getScreenshotSources: async function(e) {
117
+ let t = this.$refs.scaffold?.$module?.zincRenderer;
118
+ return t ? [n(t, e)] : [];
110
119
  },
111
120
  getState: function() {
112
121
  return this.$refs.scaffold ? this.$refs.scaffold.getState() : this.entry.state;
@@ -140,11 +149,11 @@ var p = {
140
149
  }
141
150
  },
142
151
  scaffoldIsReady: function() {
143
- this.scaffoldLoaded = !0, this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [
152
+ this.scaffoldLoaded = !0, this.$emit("viewer-ready", !0), this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [
144
153
  1,
145
154
  0,
146
155
  1
147
- ], this.scaffoldRef || (this.scaffoldRef = l(this.$refs.scaffold), this.scaffoldRef && (this.loadExplorerConfig(), this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities, this.connectivityFilterOptions = this.connectivitiesStore.filterOptions, this.connectivityFilterSources = this.connectivitiesStore.filterSources)), this.updateViewerSettings(), r.emit("mapLoaded", this.$refs.scaffold), setTimeout(() => {
156
+ ], this.scaffoldRef || (this.scaffoldRef = u(this.$refs.scaffold), this.scaffoldRef && (this.loadExplorerConfig(), this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities, this.connectivityFilterOptions = this.connectivitiesStore.filterOptions, this.connectivityFilterSources = this.connectivitiesStore.filterSources)), this.updateViewerSettings(), i.emit("mapLoaded", this.$refs.scaffold), this._greyScaleTimer = setTimeout(() => {
148
157
  this.setNerveGreyScale();
149
158
  }, 500);
150
159
  },
@@ -187,26 +196,24 @@ var p = {
187
196
  },
188
197
  markerLabels: function() {
189
198
  return this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.numberOfDatasetsForFacets : {};
199
+ },
200
+ scaffoldKnowledge: function() {
201
+ return this.connectivityKnowledge?.[this.entry.resource];
190
202
  }
191
203
  },
192
204
  watch: {
193
205
  visible: {
194
206
  handler(e) {
195
207
  e && !this.activated && (this.activated = !0, this.$nextTick(() => {
196
- this.$refs.scaffold && (this.scaffoldRef = l(this.$refs.scaffold), this.scaffoldRef && (this.loadExplorerConfig(), this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities, this.connectivityFilterOptions = this.connectivitiesStore.filterOptions, this.connectivityFilterSources = this.connectivitiesStore.filterSources));
208
+ this.$refs.scaffold && (this.scaffoldRef = u(this.$refs.scaffold), this.scaffoldRef && (this.loadExplorerConfig(), this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities, this.connectivityFilterOptions = this.connectivitiesStore.filterOptions, this.connectivityFilterSources = this.connectivitiesStore.filterSources));
197
209
  }));
198
210
  },
199
- deep: !0,
200
211
  immediate: !0
201
212
  },
202
- connectivityKnowledge: {
203
- handler(e, t) {
204
- if (this.entry.resource in e) {
205
- let t = e[this.entry.resource];
206
- t.length !== this.nervesKnowledge.length && (this.nervesKnowledge = t, this.scaffoldLoaded && this.setNerveGreyScale());
207
- }
213
+ scaffoldKnowledge: {
214
+ handler(e) {
215
+ e && e.length !== this.nervesKnowledge.length && (this.nervesKnowledge = e, this.scaffoldLoaded && this.setNerveGreyScale());
208
216
  },
209
- deep: !0,
210
217
  immediate: !0
211
218
  }
212
219
  },
@@ -221,11 +228,14 @@ var p = {
221
228
  filter: [],
222
229
  query: ""
223
230
  };
231
+ },
232
+ beforeUnmount: function() {
233
+ clearTimeout(this._greyScaleTimer);
224
234
  }
225
- }, m = { class: "viewer-container" };
226
- function h(e, t, n, r, i, a) {
227
- let l = d("ScaffoldVuer"), f = d("HelpModeDialog");
228
- return u(), c("div", m, [e.activated ? (u(), o(l, {
235
+ }, h = { class: "viewer-container" };
236
+ function g(e, t, n, r, i, a) {
237
+ let o = f("ScaffoldVuer"), u = f("HelpModeDialog");
238
+ return d(), l("div", h, [e.activated ? (d(), s(o, {
229
239
  key: 0,
230
240
  state: e.entry.state,
231
241
  url: e.entry.resource,
@@ -289,7 +299,7 @@ function h(e, t, n, r, i, a) {
289
299
  "showLocalSettings",
290
300
  "showOpenMapButton",
291
301
  "usageConfig"
292
- ])) : s("", !0), e.helpMode && e.useHelpModeDialog ? (u(), o(f, {
302
+ ])) : c("", !0), e.helpMode && e.useHelpModeDialog ? (d(), s(u, {
293
303
  key: 1,
294
304
  ref: "scaffoldHelp",
295
305
  scaffoldRef: e.scaffoldRef,
@@ -301,8 +311,8 @@ function h(e, t, n, r, i, a) {
301
311
  "lastItem",
302
312
  "onShowNext",
303
313
  "onFinishHelpMode"
304
- ])) : s("", !0)]);
314
+ ])) : c("", !0)]);
305
315
  }
306
- var g = /*#__PURE__*/ t(p, [["render", h], ["__scopeId", "data-v-53ea7deb"]]);
316
+ var _ = /*#__PURE__*/ t(m, [["render", g], ["__scopeId", "data-v-a45fd8e7"]]);
307
317
  //#endregion
308
- export { g as default };
318
+ export { _ as default };
@@ -0,0 +1,32 @@
1
+ import { F as e } from "./connectivities-LtlFwLOp.js";
2
+ import { t } from "./ContentMixin-Db8nqZax.js";
3
+ import { createBlock as n, createElementBlock as r, openBlock as i, resolveComponent as a } from "vue";
4
+ import { SimulationVuer as o } from "@abi-software/simulationvuer";
5
+ import "@abi-software/simulationvuer/dist/style.css";
6
+ //#region src/components/viewers/Simulation.vue
7
+ var s = {
8
+ name: "Simulation",
9
+ mixins: [t],
10
+ components: { SimulationVuer: o },
11
+ data: function() {
12
+ return { isCrossOriginIsolated: window.crossOriginIsolated === !0 };
13
+ },
14
+ computed: { id: function() {
15
+ return this.entry.resource ? this.entry.resource : this.entry.discoverId;
16
+ } }
17
+ }, c = {
18
+ key: 1,
19
+ class: "simulation-unsupported"
20
+ };
21
+ function l(e, t, o, s, l, u) {
22
+ let d = a("SimulationVuer");
23
+ return e.isCrossOriginIsolated ? (i(), n(d, {
24
+ key: 0,
25
+ apiLocation: e.apiLocation,
26
+ id: u.id,
27
+ ref: "simulation"
28
+ }, null, 8, ["apiLocation", "id"])) : (i(), r("div", c, " Simulations require a cross-origin isolated page (for SharedArrayBuffer support). This browser or host is not configured for it. "));
29
+ }
30
+ var u = /*#__PURE__*/ e(s, [["render", l], ["__scopeId", "data-v-627e2ba4"]]);
31
+ //#endregion
32
+ export { u as default };