@abi-software/mapintegratedvuer 1.6.3 → 1.6.4-beta.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.
package/cypress.config.js CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ import { configureVisualRegression } from 'cypress-visual-regression';
3
+
2
4
  export default {
3
5
  defaultCommandTimeout: 10000,
4
6
  reporter: "junit",
@@ -17,6 +19,15 @@ export default {
17
19
  framework: "vue",
18
20
  bundler: "vite",
19
21
  },
22
+ env: {
23
+ visualRegressionType: 'regression',
24
+ visualRegressionGenerateDiff: 'always',
25
+ visualRegressionFailSilently: false
26
+ },
27
+ screenshotsFolder: './cypress/snapshots/actual',
28
+ setupNodeEvents(on, config) {
29
+ configureVisualRegression(on)
30
+ },
20
31
  },
21
32
  video: true,
22
33
  videoCompression: true,
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { u as p, b as g, E as l, T as y, c as m, d as w } from "./index-BGGZxwXr.js";
2
+ import { u as p, b as g, E as l, T as y, c as m, d as w } from "./index-C5HdWlzX.js";
3
3
  import { mapStores as A } from "pinia";
4
4
  let c = 7, s = 5;
5
5
  const v = [
@@ -256,7 +256,7 @@ const v = [
256
256
  function N(e) {
257
257
  return e[0].toUpperCase() + e.substring(1);
258
258
  }
259
- const B = {
259
+ const O = {
260
260
  emits: ["flatmap-provenance-ready", "resource-selected", "species-changed"],
261
261
  props: {
262
262
  /**
@@ -304,6 +304,9 @@ const B = {
304
304
  openMap: function(e) {
305
305
  e === "SYNC" ? (this.toggleSyncMode(), this.trackOpenMap("toggle_map_sync_mode")) : (l.emit("OpenNewMap", e), this.trackOpenMap(`open_new_${e}_map`)), this.onConnectivityInfoClose();
306
306
  },
307
+ onMapmanagerLoaded: function(e) {
308
+ this.settingsStore.updateMapManager(e);
309
+ },
307
310
  trackOpenMap: function(e) {
308
311
  y.sendEvent({
309
312
  event: "interaction_event",
@@ -575,11 +578,12 @@ const B = {
575
578
  scaffoldRef: null,
576
579
  scaffoldLoaded: !1,
577
580
  isInHelp: !1,
578
- hoverDelay: void 0
581
+ hoverDelay: void 0,
582
+ mapManager: void 0
579
583
  };
580
584
  },
581
585
  created: function() {
582
- this.flatmapAPI = void 0, this.apiLocation = void 0, this.settingsStore.flatmapAPI && (this.flatmapAPI = this.settingsStore.flatmapAPI), this.settingsStore.sparcApi && (this.apiLocation = this.settingsStore.sparcApi);
586
+ this.flatmapAPI = void 0, this.apiLocation = void 0, this.settingsStore.flatmapAPI && (this.flatmapAPI = this.settingsStore.flatmapAPI), this.settingsStore.sparcApi && (this.apiLocation = this.settingsStore.sparcApi), this.settingsStore.mapManager && (this.mapManager = this.settingsStore.mapManager);
583
587
  },
584
588
  watch: {
585
589
  helpMode: function(e) {
@@ -588,5 +592,5 @@ const B = {
588
592
  }
589
593
  };
590
594
  export {
591
- B as C
595
+ O as C
592
596
  };
@@ -1,12 +1,12 @@
1
- import { _ as d, K as h, t as u, T as r, E as l } from "./index-BGGZxwXr.js";
2
- import { C as I } from "./ContentMixin-CWtYskLS.js";
3
- import { D as v, Q as y } from "./style-CmiFzzZy.js";
4
- import { resolveComponent as s, openBlock as p, createElementBlock as g, createVNode as M, createBlock as S, createCommentVNode as C } from "vue";
1
+ import { _ as c, j as h, t as u, T as l, E as r } from "./index-C5HdWlzX.js";
2
+ import { C as I } from "./ContentMixin-ONv_Sw06.js";
3
+ import { D as g, v as M } from "./style-CMKavN8A.js";
4
+ import { resolveComponent as s, openBlock as p, createElementBlock as v, createVNode as y, createBlock as S, createCommentVNode as C } from "vue";
5
5
  const F = {
6
6
  name: "Flatmap",
7
- mixins: [I, v],
7
+ mixins: [I, g],
8
8
  components: {
9
- FlatmapVuer: y,
9
+ FlatmapVuer: M,
10
10
  HelpModeDialog: h
11
11
  },
12
12
  methods: {
@@ -23,69 +23,69 @@ const F = {
23
23
  var e;
24
24
  return (e = this.$refs.flatmap) == null ? void 0 : e.mapImp;
25
25
  },
26
- flatmaprResourceSelected: function(e, t) {
27
- if (this.resourceSelected(e, t), t.eventType === "click" && t.feature.type === "feature") {
28
- const a = {
29
- label: t.label || "",
30
- id: t.feature.id || "",
31
- featureId: t.feature.featureId || "",
32
- taxonomy: t.taxonomy || "",
33
- resources: t.resource.join(", ")
34
- }, n = u(a);
35
- r.sendEvent({
26
+ flatmaprResourceSelected: function(e, a) {
27
+ if (this.resourceSelected(e, a), a.eventType === "click" && a.feature.type === "feature") {
28
+ const n = {
29
+ label: a.label || "",
30
+ id: a.feature.id || "",
31
+ featureId: a.feature.featureId || "",
32
+ taxonomy: a.taxonomy || "",
33
+ resources: a.resource.join(", ")
34
+ }, t = u(n);
35
+ l.sendEvent({
36
36
  event: "interaction_event",
37
37
  event_name: "portal_maps_connectivity",
38
- category: n,
38
+ category: t,
39
39
  location: e + " " + this.$refs.flatmap.viewingMode
40
40
  });
41
41
  }
42
42
  },
43
43
  flatmapReadyCall: function(e) {
44
- let t = { id: this.entry.id, prov: this.getFlatmapImp().provenance };
45
- l.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t), this.flatmapReadyForMarkerUpdates(e), l.emit("mapLoaded", e);
44
+ let a = { id: this.entry.id, prov: this.getFlatmapImp().provenance };
45
+ r.emit("mapImpProv", a), this.$emit("flatmap-provenance-ready", a), this.flatmapReadyForMarkerUpdates(e), r.emit("mapLoaded", e);
46
46
  },
47
47
  onPathwaySelectionChanged: function(e) {
48
- const { label: t, property: a, checked: n, selectionsTitle: i } = e;
49
- r.sendEvent({
48
+ const { label: a, property: n, checked: t, selectionsTitle: i } = e;
49
+ l.sendEvent({
50
50
  event: "interaction_event",
51
51
  event_name: "portal_maps_pathway_change",
52
- category: t + " [" + a + "] " + n,
52
+ category: a + " [" + n + "] " + t,
53
53
  location: i
54
54
  });
55
55
  },
56
56
  highlightFeatures: function(e) {
57
- let t = e.name;
58
- const a = this.$refs.flatmap.mapImp;
59
- if (t) {
60
- const n = a.search(t);
61
- n.featureIds[0] && a.highlightFeatures([
62
- a.modelForFeature(n.featureIds[0])
57
+ let a = e.name;
58
+ const n = this.$refs.flatmap.mapImp;
59
+ if (a) {
60
+ const t = n.search(a);
61
+ t.featureIds[0] && n.highlightFeatures([
62
+ n.modelForFeature(t.featureIds[0])
63
63
  ]);
64
64
  }
65
65
  },
66
66
  /**
67
67
  * Append the list of suggested terms to suggestions
68
68
  */
69
- searchSuggestions: function(e, t) {
69
+ searchSuggestions: function(e, a) {
70
70
  if (e && this.$refs.flatmap.mapImp) {
71
- const a = this.$refs.flatmap.mapImp.search(e);
72
- (a.__featureIds || a.featureIds).forEach((i) => {
71
+ const n = this.$refs.flatmap.mapImp.search(e);
72
+ (n.__featureIds || n.featureIds).forEach((i) => {
73
73
  const o = this.$refs.flatmap.mapImp.annotation(i);
74
- o && o.label && t.push(o.label);
74
+ o && o.label && a.push(o.label);
75
75
  });
76
76
  }
77
77
  },
78
- zoomToFeatures: function(e, t) {
79
- let a = e.name;
80
- const n = this.$refs.flatmap.mapImp;
81
- if (a) {
82
- const i = n.search(a);
78
+ zoomToFeatures: function(e, a) {
79
+ let n = e.name;
80
+ const t = this.$refs.flatmap.mapImp;
81
+ if (n) {
82
+ const i = t.search(n);
83
83
  if (i.featureIds.length) {
84
- let o = n.modelForFeature(i.featureIds[0]);
85
- o ? (t && n.selectFeatures(o), n.zoomToFeatures(o)) : n.clearSearchResults();
84
+ let o = t.modelForFeature(i.featureIds[0]);
85
+ o ? (a && t.selectFeatures(o), t.zoomToFeatures(o)) : t.clearSearchResults();
86
86
  }
87
87
  } else
88
- n.clearSearchResults();
88
+ t.clearSearchResults();
89
89
  },
90
90
  changeViewingMode: function(e) {
91
91
  this.$refs.flatmap.changeViewingMode(e);
@@ -97,29 +97,30 @@ const F = {
97
97
  }
98
98
  },
99
99
  mounted: function() {
100
- l.on("annotation-close", (e) => {
101
- const t = this.$refs.flatmap;
102
- e != null && e.tabClose && t && this.$refs.flatmap.annotationEventCallback({}, { type: "aborted" });
103
- }), l.on("markerUpdate", () => {
100
+ r.on("annotation-close", (e) => {
101
+ const a = this.$refs.flatmap;
102
+ e != null && e.tabClose && a && this.$refs.flatmap.annotationEventCallback({}, { type: "aborted" });
103
+ }), r.on("markerUpdate", () => {
104
104
  this.flatmapMarkerUpdate(void 0);
105
- }), l.on("hoverUpdate", () => {
105
+ }), r.on("hoverUpdate", () => {
106
106
  this.mapHoverHighlight(this.$refs.flatmap.mapImp);
107
- }), l.on("show-connectivity", (e) => {
108
- const { featureIds: t, offset: a } = e, n = this.$refs.flatmap;
109
- n && n.moveMap(t, {
110
- offsetX: a ? -150 : 0,
107
+ }), r.on("show-connectivity", (e) => {
108
+ const { featureIds: a, offset: n } = e, t = this.$refs.flatmap;
109
+ t && t.moveMap(a, {
110
+ offsetX: n ? -150 : 0,
111
111
  zoom: 4
112
112
  });
113
113
  });
114
114
  }
115
115
  }, w = { class: "viewer-container" };
116
- function b(e, t, a, n, i, o) {
116
+ function b(e, a, n, t, i, o) {
117
117
  const m = s("FlatmapVuer"), f = s("HelpModeDialog");
118
- return p(), g("div", w, [
119
- M(m, {
118
+ return p(), v("div", w, [
119
+ y(m, {
120
120
  state: e.entry.state,
121
121
  entry: e.entry.resource,
122
- onResourceSelected: t[0] || (t[0] = (c) => o.flatmaprResourceSelected(e.entry.type, c)),
122
+ mapManager: e.mapManager,
123
+ onResourceSelected: a[0] || (a[0] = (d) => o.flatmaprResourceSelected(e.entry.type, d)),
123
124
  onPanZoomCallback: e.flatmapPanZoomCallback,
124
125
  name: e.entry.resource,
125
126
  style: { height: "100%", width: "100%" },
@@ -147,8 +148,9 @@ function b(e, t, a, n, i, o) {
147
148
  flatmapAPI: e.flatmapAPI,
148
149
  sparcAPI: e.apiLocation,
149
150
  onOpenMap: e.openMap,
150
- onPathwaySelectionChanged: o.onPathwaySelectionChanged
151
- }, null, 8, ["state", "entry", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onConnectivityGraphError", "connectivityInfoSidebar", "onReady", "flatmapAPI", "sparcAPI", "onOpenMap", "onPathwaySelectionChanged"]),
151
+ onPathwaySelectionChanged: o.onPathwaySelectionChanged,
152
+ onMapmanagerLoaded: e.onMapmanagerLoaded
153
+ }, null, 8, ["state", "entry", "mapManager", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onConnectivityGraphError", "connectivityInfoSidebar", "onReady", "flatmapAPI", "sparcAPI", "onOpenMap", "onPathwaySelectionChanged", "onMapmanagerLoaded"]),
152
154
  e.helpMode && e.useHelpModeDialog ? (p(), S(f, {
153
155
  key: 0,
154
156
  ref: "flatmapHelp",
@@ -159,7 +161,7 @@ function b(e, t, a, n, i, o) {
159
161
  }, null, 8, ["flatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : C("", !0)
160
162
  ]);
161
163
  }
162
- const R = /* @__PURE__ */ d(F, [["render", b], ["__scopeId", "data-v-7635fa9b"]]);
164
+ const R = /* @__PURE__ */ c(F, [["render", b], ["__scopeId", "data-v-9e155ca8"]]);
163
165
  export {
164
166
  R as default
165
167
  };
@@ -1,6 +1,6 @@
1
- import { C as r } from "./ContentMixin-CWtYskLS.js";
1
+ import { C as r } from "./ContentMixin-ONv_Sw06.js";
2
2
  import { openBlock as o, createElementBlock as t, createElementVNode as s } from "vue";
3
- import { _ as n } from "./index-BGGZxwXr.js";
3
+ import { _ as n } from "./index-C5HdWlzX.js";
4
4
  const a = {
5
5
  name: "Iframe",
6
6
  mixins: [r]
@@ -1,6 +1,6 @@
1
- import { _ as u, K as h, a as y, g, E as r, t as M, T as p } from "./index-BGGZxwXr.js";
2
- import { C as v } from "./ContentMixin-CWtYskLS.js";
3
- import { D as I, a as C } from "./style-CmiFzzZy.js";
1
+ import { _ as u, j as h, a as y, g, E as r, t as M, T as p } from "./index-C5HdWlzX.js";
2
+ import { C as v } from "./ContentMixin-ONv_Sw06.js";
3
+ import { D as I, z as C } from "./style-CMKavN8A.js";
4
4
  import { resolveComponent as f, openBlock as c, createElementBlock as S, createVNode as F, createBlock as k, createCommentVNode as w } from "vue";
5
5
  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>', d = (e) => {
6
6
  const t = [
@@ -273,7 +273,7 @@ const b = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
273
273
  },
274
274
  mounted: function() {
275
275
  this.getFeaturedDatasets(), r.on("annotation-close", (e) => {
276
- e != null && e.tabClose && this.$refs.multiflatmap.getCurrentFlatmap() && this.$refs.multiflatmap.getCurrentFlatmap().annotationEventCallback({}, { type: "aborted" });
276
+ e != null && e.tabClose && this.flatmapReady && this.$refs.multiflatmap && this.$refs.multiflatmap.getCurrentFlatmap().annotationEventCallback({}, { type: "aborted" });
277
277
  }), r.on("show-connectivity", (e) => {
278
278
  const { featureIds: t, offset: a } = e;
279
279
  if (this.flatmapReady && this.$refs.multiflatmap) {
@@ -300,6 +300,7 @@ function L(e, t, a, n, o, i) {
300
300
  onFlatmapChanged: i.flatmapChanged,
301
301
  onReady: i.multiFlatmapReady,
302
302
  state: e.entry.state,
303
+ mapManager: e.mapManager,
303
304
  onResourceSelected: t[0] || (t[0] = (m) => i.flatmaprResourceSelected(e.entry.type, m)),
304
305
  style: { height: "100%", width: "100%" },
305
306
  initial: e.entry.resource,
@@ -327,8 +328,9 @@ function L(e, t, a, n, o, i) {
327
328
  onOpenMap: e.openMap,
328
329
  onFinishHelpMode: e.endHelp,
329
330
  onPathwaySelectionChanged: i.onPathwaySelectionChanged,
330
- onOpenPubmedUrl: i.onOpenPubmedUrl
331
- }, null, 8, ["availableSpecies", "onFlatmapChanged", "onReady", "state", "initial", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onConnectivityGraphError", "connectivityInfoSidebar", "showStarInLegend", "openMapOptions", "flatmapAPI", "sparcAPI", "onPanZoomCallback", "onOpenMap", "onFinishHelpMode", "onPathwaySelectionChanged", "onOpenPubmedUrl"]),
331
+ onOpenPubmedUrl: i.onOpenPubmedUrl,
332
+ onMapmanagerLoaded: e.onMapmanagerLoaded
333
+ }, null, 8, ["availableSpecies", "onFlatmapChanged", "onReady", "state", "mapManager", "initial", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onConnectivityGraphError", "connectivityInfoSidebar", "showStarInLegend", "openMapOptions", "flatmapAPI", "sparcAPI", "onPanZoomCallback", "onOpenMap", "onFinishHelpMode", "onPathwaySelectionChanged", "onOpenPubmedUrl", "onMapmanagerLoaded"]),
332
334
  e.helpMode && e.useHelpModeDialog ? (c(), k(l, {
333
335
  key: 0,
334
336
  ref: "multiflatmapHelp",
@@ -339,7 +341,7 @@ function L(e, t, a, n, o, i) {
339
341
  }, null, 8, ["multiflatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : w("", !0)
340
342
  ]);
341
343
  }
342
- const T = /* @__PURE__ */ u(R, [["render", L], ["__scopeId", "data-v-4282737c"]]);
344
+ const T = /* @__PURE__ */ u(R, [["render", L], ["__scopeId", "data-v-f3105a40"]]);
343
345
  export {
344
346
  T as default
345
347
  };
@@ -1,7 +1,7 @@
1
1
  import { y as o } from "./plotvuer-DSwGHaaa.js";
2
- import { C as a } from "./ContentMixin-CWtYskLS.js";
2
+ import { C as a } from "./ContentMixin-ONv_Sw06.js";
3
3
  import { resolveComponent as r, openBlock as n, createBlock as s } from "vue";
4
- import { _ as m } from "./index-BGGZxwXr.js";
4
+ import { _ as m } from "./index-C5HdWlzX.js";
5
5
  const p = {
6
6
  name: "Plot",
7
7
  mixins: [a],