@abi-software/mapintegratedvuer 1.1.0-beta.5 → 1.1.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 (31) hide show
  1. package/README.md +15 -2
  2. package/dist/{ContentMixin-C35Jowvp.js → ContentMixin-Belbk7R9.js} +97 -61
  3. package/dist/Flatmap-BEStr9DR.js +146 -0
  4. package/dist/{Iframe-fcNscihB.js → Iframe-CNeqS04g.js} +2 -2
  5. package/dist/{MultiFlatmap-BIT2tVyE.js → MultiFlatmap-CFF8nyw2.js} +81 -64
  6. package/dist/{Plot-B9xsWP2v.js → Plot-BpS4tvSe.js} +2 -2
  7. package/dist/{Scaffold-DYoxAJI0.js → Scaffold-BXY9_HO6.js} +10925 -10528
  8. package/dist/{Simulation-s1KOrb80.js → Simulation-Di2xaBxJ.js} +2 -2
  9. package/dist/{flatmapvuer-BM5z_95w.js → flatmapvuer-C67b_5lI.js} +11707 -11453
  10. package/dist/{index-DIFC-Q9x.js → index-CpppckRD.js} +4349 -4325
  11. package/dist/mapintegratedvuer.js +1 -1
  12. package/dist/mapintegratedvuer.umd.cjs +479 -479
  13. package/dist/style-CdEDV2B6.js +62 -0
  14. package/dist/style.css +1 -1
  15. package/package.json +7 -4
  16. package/src/App.vue +10 -1
  17. package/src/components/FlatmapContextCard.vue +22 -10
  18. package/src/components/MapContent.vue +20 -2
  19. package/src/components/SplitDialog.vue +4 -4
  20. package/src/components/SplitFlow.vue +6 -9
  21. package/src/components/viewers/Flatmap.vue +23 -5
  22. package/src/components/viewers/MultiFlatmap.vue +31 -11
  23. package/src/components/viewers/Scaffold.vue +17 -2
  24. package/src/components.d.ts +0 -1
  25. package/src/mixins/ContentMixin.js +72 -3
  26. package/src/mixins/DynamicMarkerMixin.js +44 -25
  27. package/src/services/tagging.js +3 -4
  28. package/src/stores/settings.js +5 -1
  29. package/src/stores/splitFlow.js +42 -30
  30. package/dist/Flatmap-9P71mP5D.js +0 -128
  31. package/dist/style-B-Ps72EF.js +0 -50
@@ -1,9 +1,9 @@
1
- import { _ as u, a as f, g as d, E as l, t as h, T as p } from "./index-DIFC-Q9x.js";
2
- import { C as y } from "./flatmapvuer-BM5z_95w.js";
3
- import { C as g } from "./ContentMixin-C35Jowvp.js";
4
- import { D as M } from "./style-B-Ps72EF.js";
5
- import { resolveComponent as v, openBlock as I, createBlock as S } from "vue";
6
- const C = '<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>', m = (e) => {
1
+ import { _ as c, a as h, g as M, E as l, t as g, T as p } from "./index-CpppckRD.js";
2
+ import { D as y, B as v } from "./flatmapvuer-C67b_5lI.js";
3
+ import { C as S } from "./ContentMixin-Belbk7R9.js";
4
+ import { D as I } from "./style-CdEDV2B6.js";
5
+ import { resolveComponent as d, openBlock as f, createElementBlock as k, Fragment as C, createVNode as F, createBlock as w, createCommentVNode as R } from "vue";
6
+ const b = '<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>', u = (e) => {
7
7
  const t = [
8
8
  {
9
9
  display: "Open AC Map",
@@ -29,20 +29,21 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
29
29
  break;
30
30
  }
31
31
  return t;
32
- }, k = {
32
+ }, H = {
33
33
  name: "MultiFlatmap",
34
- mixins: [g, M],
34
+ mixins: [S, I],
35
35
  components: {
36
- MultiFlatmapVuer: y
36
+ MultiFlatmapVuer: y,
37
+ HelpModeDialog: v
37
38
  },
38
39
  data: function() {
39
40
  return {
40
41
  zoomLevel: 6,
41
42
  flatmapReady: !1,
42
- availableSpecies: f(),
43
+ availableSpecies: h(),
43
44
  scaffoldResource: {},
44
45
  showStarInLegend: !1,
45
- openMapOptions: m("Rat")
46
+ openMapOptions: u("Rat")
46
47
  };
47
48
  },
48
49
  methods: {
@@ -60,7 +61,7 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
60
61
  title: "View 3D scaffold",
61
62
  layout: "2horpanel",
62
63
  type: "SyncMap"
63
- } : (this.activeSpecies === "Human Male" || this.activeSpecies === "Human Female") && ("human" in this.scaffoldResource || (this.scaffoldResource.human = await d(this.apiLocation, "human")), e = {
64
+ } : (this.activeSpecies === "Human Male" || this.activeSpecies === "Human Female") && ("human" in this.scaffoldResource || (this.scaffoldResource.human = await M(this.apiLocation, "human")), e = {
64
65
  contextCardUrl: this.scaffoldResource.human.datasetInfo.contextCardUrl,
65
66
  discoverId: this.scaffoldResource.human.datasetInfo.discoverId,
66
67
  s3uri: this.scaffoldResource.human.datasetInfo.s3uri,
@@ -87,7 +88,7 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
87
88
  payload: e,
88
89
  type: this.entry.type
89
90
  };
90
- this.$emit("resource-selected", t);
91
+ this.flatmapMarkerZoomUpdate(!1, void 0), this.$emit("resource-selected", t);
91
92
  }
92
93
  },
93
94
  /**
@@ -101,9 +102,9 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
101
102
  */
102
103
  searchSuggestions: function(e, t) {
103
104
  const a = this.$refs.multiflatmap.getCurrentFlatmap();
104
- e && a.mapImp && a.mapImp.search(e).__featureIds.forEach((s) => {
105
- const i = a.mapImp.annotation(s);
106
- i && i.label && t.push(i.label);
105
+ e && a.mapImp && a.mapImp.search(e).__featureIds.forEach((o) => {
106
+ const s = a.mapImp.annotation(o);
107
+ s && s.label && t.push(s.label);
107
108
  });
108
109
  },
109
110
  flatmaprResourceSelected: function(e, t) {
@@ -115,22 +116,22 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
115
116
  featureId: t.feature.featureId || "",
116
117
  taxonomy: t.taxonomy || "",
117
118
  resources: t.resource.join(", ")
118
- }, s = h(n);
119
+ }, o = g(n);
119
120
  p.sendEvent({
120
121
  event: "interaction_event",
121
122
  event_name: "portal_maps_connectivity",
122
- category: s,
123
+ category: o,
123
124
  location: e + " " + a.viewingMode
124
125
  });
125
126
  }
126
127
  },
127
128
  onPathwaySelectionChanged: function(e) {
128
- const { label: t, property: a, checked: n, selectionsTitle: s } = e;
129
+ const { label: t, property: a, checked: n, selectionsTitle: o } = e;
129
130
  p.sendEvent({
130
131
  event: "interaction_event",
131
132
  event_name: "portal_maps_pathway_change",
132
133
  category: t + " [" + a + "] " + n,
133
- location: s
134
+ location: o
134
135
  });
135
136
  },
136
137
  onOpenPubmedUrl: function(e) {
@@ -146,13 +147,13 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
146
147
  */
147
148
  handleSyncPanZoomEvent: function(e) {
148
149
  if (!this.mouseHovered && e.type !== this.entry.type) {
149
- const t = e.payload.zoom, a = e.payload.target, n = this.$el.clientHeight, s = this.$el.clientWidth, i = Math.max(s, n);
150
- let r = s / i / t;
151
- const o = n / i / t, c = [
152
- a[0] / 2 + 0.5 - r / 2,
153
- 0.5 - a[1] / 2 - o / 2
150
+ const t = e.payload.zoom, a = e.payload.target, n = this.$el.clientHeight, o = this.$el.clientWidth, s = Math.max(o, n);
151
+ let i = o / s / t;
152
+ const r = n / s / t, m = [
153
+ a[0] / 2 + 0.5 - i / 2,
154
+ 0.5 - a[1] / 2 - r / 2
154
155
  ];
155
- this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(c, [r, o]);
156
+ this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(m, [i, r]), this.flatmapMarkerZoomUpdate(!1, void 0);
156
157
  }
157
158
  },
158
159
  displayTooltip: function(e) {
@@ -165,8 +166,8 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
165
166
  let a = e.name;
166
167
  const n = this.$refs.multiflatmap.getCurrentFlatmap().mapImp;
167
168
  if (a) {
168
- const s = n.search(a);
169
- s.featureIds.length > 0 ? (t && n.selectFeatures(s.featureIds), n.zoomToFeatures(s.featureIds)) : n.clearSearchResults();
169
+ const o = n.search(a);
170
+ o.featureIds.length > 0 ? (t && n.selectFeatures(o.featureIds), n.zoomToFeatures(o.featureIds)) : n.clearSearchResults();
170
171
  } else
171
172
  n.clearSearchResults();
172
173
  },
@@ -186,7 +187,7 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
186
187
  }
187
188
  },
188
189
  flatmapChanged: async function(e) {
189
- this.activeSpecies = e, this.openMapOptions = m(e), this.$emit("species-changed", e), this.entry.state && this.entry.state.species === this.activeSpecies || this.syncMode == !0 && await this.toggleSyncMode(), this.updateProvCard(), p.sendEvent({
190
+ this.activeSpecies = e, this.openMapOptions = u(e), this.$emit("species-changed", e), this.entry.state && this.entry.state.species === this.activeSpecies || this.syncMode == !0 && await this.toggleSyncMode(), this.updateProvCard(), p.sendEvent({
190
191
  event: "interaction_event",
191
192
  event_name: "portal_maps_species_change",
192
193
  category: this.activeSpecies
@@ -196,11 +197,11 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
196
197
  if (e) {
197
198
  e.enablePanZoomEvents(!0), this.flatmapReady = !0;
198
199
  const t = e.mapImp;
199
- this.flatmapMarkerUpdate(t), this.updateProvCard();
200
+ this.flatmapMarkerZoomUpdate(!0, t), this.updateProvCard();
200
201
  }
201
202
  },
202
203
  getFlatmapImp: function() {
203
- if (this.entry.type === "MultiFlatmap" && this.flatmapReady)
204
+ if (this.entry.type === "MultiFlatmap" && this.flatmapReady && this.$refs.multiflatmap)
204
205
  return this.$refs.multiflatmap.getCurrentFlatmap().mapImp;
205
206
  },
206
207
  flatmapAreaSearch() {
@@ -225,18 +226,18 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
225
226
  const n = this.settingsStore.featuredMarkerSpecies[t];
226
227
  if (n && !this.activeSpecies.startsWith(n))
227
228
  return !1;
228
- let s = a;
229
- if (s || (s = this.getFlatmapImp()), s) {
230
- let i = document.createElement("div");
231
- i.innerHTML = C;
232
- const r = s.addMarker(e, {
233
- element: i,
229
+ let o = a;
230
+ if (o || (o = this.getFlatmapImp()), o) {
231
+ let s = document.createElement("div");
232
+ s.innerHTML = b;
233
+ const i = o.addMarker(e, {
234
+ element: s,
234
235
  className: "highlight-marker",
235
236
  cluster: !1
236
237
  });
237
238
  return this.settingsStore.updateFeaturedMarkerIdentifier({
238
239
  index: t,
239
- markerIdentifier: r
240
+ markerIdentifier: i
240
241
  }), !0;
241
242
  }
242
243
  return !1;
@@ -260,35 +261,51 @@ const C = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
260
261
  },
261
262
  mounted: function() {
262
263
  this.getAvailableTerms(), this.getFeaturedDatasets(), l.on("markerUpdate", () => {
263
- this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
264
+ this.flatmapMarkerZoomUpdate(!0, void 0);
264
265
  });
265
266
  }
266
267
  };
267
- function F(e, t, a, n, s, i) {
268
- const r = v("MultiFlatmapVuer");
269
- return I(), S(r, {
270
- availableSpecies: e.availableSpecies,
271
- onFlatmapChanged: i.flatmapChanged,
272
- onReady: i.multiFlatmapReady,
273
- state: e.entry.state,
274
- onResourceSelected: t[0] || (t[0] = (o) => i.flatmaprResourceSelected(e.entry.type, o)),
275
- style: { height: "100%", width: "100%" },
276
- initial: e.entry.resource,
277
- helpMode: e.helpMode,
278
- ref: "multiflatmap",
279
- displayMinimap: !0,
280
- showStarInLegend: e.showStarInLegend,
281
- enableOpenMapUI: !0,
282
- openMapOptions: e.openMapOptions,
283
- flatmapAPI: e.flatmapAPI,
284
- sparcAPI: e.apiLocation,
285
- onPanZoomCallback: i.flatmapPanZoomCallback,
286
- onOpenMap: e.openMap,
287
- onPathwaySelectionChanged: i.onPathwaySelectionChanged,
288
- onOpenPubmedUrl: i.onOpenPubmedUrl
289
- }, null, 8, ["availableSpecies", "onFlatmapChanged", "onReady", "state", "initial", "helpMode", "showStarInLegend", "openMapOptions", "flatmapAPI", "sparcAPI", "onPanZoomCallback", "onOpenMap", "onPathwaySelectionChanged", "onOpenPubmedUrl"]);
268
+ function P(e, t, a, n, o, s) {
269
+ const i = d("MultiFlatmapVuer"), r = d("HelpModeDialog");
270
+ return f(), k(C, null, [
271
+ F(i, {
272
+ availableSpecies: e.availableSpecies,
273
+ onFlatmapChanged: s.flatmapChanged,
274
+ onReady: s.multiFlatmapReady,
275
+ state: e.entry.state,
276
+ onResourceSelected: t[0] || (t[0] = (m) => s.flatmaprResourceSelected(e.entry.type, m)),
277
+ style: { height: "100%", width: "100%" },
278
+ initial: e.entry.resource,
279
+ helpMode: e.helpMode,
280
+ helpModeActiveItem: e.helpModeActiveItem,
281
+ helpModeDialog: e.useHelpModeDialog,
282
+ onHelpModeLastItem: e.onHelpModeLastItem,
283
+ onShownTooltip: e.onTooltipShown,
284
+ onShownMapTooltip: e.onMapTooltipShown,
285
+ ref: "multiflatmap",
286
+ displayMinimap: !0,
287
+ showStarInLegend: e.showStarInLegend,
288
+ enableOpenMapUI: !0,
289
+ openMapOptions: e.openMapOptions,
290
+ flatmapAPI: e.flatmapAPI,
291
+ sparcAPI: e.apiLocation,
292
+ onPanZoomCallback: s.flatmapPanZoomCallback,
293
+ onOpenMap: e.openMap,
294
+ onFinishHelpMode: e.endHelp,
295
+ onPathwaySelectionChanged: s.onPathwaySelectionChanged,
296
+ onOpenPubmedUrl: s.onOpenPubmedUrl
297
+ }, null, 8, ["availableSpecies", "onFlatmapChanged", "onReady", "state", "initial", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "showStarInLegend", "openMapOptions", "flatmapAPI", "sparcAPI", "onPanZoomCallback", "onOpenMap", "onFinishHelpMode", "onPathwaySelectionChanged", "onOpenPubmedUrl"]),
298
+ e.helpMode && e.useHelpModeDialog ? (f(), w(r, {
299
+ key: 0,
300
+ ref: "multiflatmapHelp",
301
+ multiflatmapRef: e.multiflatmapRef,
302
+ lastItem: e.helpModeLastItem,
303
+ onShowNext: e.onHelpModeShowNext,
304
+ onFinishHelpMode: e.onFinishHelpMode
305
+ }, null, 8, ["multiflatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : R("", !0)
306
+ ], 64);
290
307
  }
291
- const L = /* @__PURE__ */ u(k, [["render", F], ["__scopeId", "data-v-5d50aea0"]]);
308
+ const A = /* @__PURE__ */ c(H, [["render", P], ["__scopeId", "data-v-1e345eca"]]);
292
309
  export {
293
- L as default
310
+ A as default
294
311
  };
@@ -1,7 +1,7 @@
1
1
  import { C as o } from "./plotvuer-X4h-Lj3L.js";
2
- import { C as a } from "./ContentMixin-C35Jowvp.js";
2
+ import { C as a } from "./ContentMixin-Belbk7R9.js";
3
3
  import { resolveComponent as r, openBlock as n, createBlock as s } from "vue";
4
- import { _ as m } from "./index-DIFC-Q9x.js";
4
+ import { _ as m } from "./index-CpppckRD.js";
5
5
  const p = {
6
6
  name: "Plot",
7
7
  mixins: [a],