@abi-software/mapintegratedvuer 1.6.5 → 1.7.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.
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,262 +1,10 @@
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-BV9-YgM-.js";
3
- import { mapStores as A } from "pinia";
4
- let c = 7, s = 5;
5
- const v = [
6
- {
7
- id: "UBERON:0000948",
8
- name: "heart",
9
- showAtZoom: 1
10
- },
11
- {
12
- id: "UBERON:0001759",
13
- name: "vagus nerve",
14
- showAtZoom: 1
15
- },
16
- {
17
- id: "UBERON:0001155",
18
- name: "colon",
19
- showAtZoom: 1
20
- },
21
- {
22
- id: "UBERON:0000945",
23
- name: "stomach",
24
- showAtZoom: 1
25
- },
26
- {
27
- id: "UBERON:0001013",
28
- name: "adipose tissue",
29
- showAtZoom: 1
30
- },
31
- {
32
- id: "UBERON:0001255",
33
- name: "urinary bladder",
34
- showAtZoom: 1
35
- },
36
- {
37
- id: "UBERON:0001348",
38
- name: "brown adipose tissue",
39
- showAtZoom: 6
40
- },
41
- {
42
- id: "UBERON:0002008",
43
- name: "cardiac nerve plexus",
44
- showAtZoom: 1
45
- },
46
- {
47
- id: "UBERON:0002240",
48
- name: "spinal cord",
49
- showAtZoom: 1
50
- },
51
- {
52
- id: "UBERON:0002005",
53
- name: "Enteric Nervous System",
54
- showAtZoom: 4
55
- },
56
- {
57
- id: "UBERON:0013702",
58
- name: "body proper",
59
- showAtZoom: 1
60
- },
61
- {
62
- id: "UBERON:0002298",
63
- name: "brainstem",
64
- showAtZoom: 1
65
- },
66
- {
67
- id: "UBERON:0002439",
68
- name: "myenteric nerve plexus",
69
- showAtZoom: 6
70
- },
71
- {
72
- id: "UBERON:0000010",
73
- name: "peripheral nervous system",
74
- showAtZoom: 6
75
- },
76
- {
77
- id: "UBERON:0002048",
78
- name: "lung",
79
- showAtZoom: 1
80
- },
81
- {
82
- id: "UBERON:0002410",
83
- name: "autonomic nervous system",
84
- showAtZoom: 6
85
- },
86
- {
87
- id: "UBERON:0002441",
88
- name: "cervicothoracic ganglion",
89
- showAtZoom: 6
90
- },
91
- {
92
- id: "UBERON:0005363",
93
- name: "inferior vagus X ganglion",
94
- showAtZoom: 6
95
- },
96
- {
97
- id: "UBERON:0001264",
98
- name: "pancreas",
99
- showAtZoom: 1
100
- },
101
- {
102
- id: "UBERON:0001884",
103
- name: "phrenic nerve",
104
- showAtZoom: 6
105
- },
106
- {
107
- id: "UBERON:0002059",
108
- name: "submandibular ganglion",
109
- showAtZoom: 7
110
- },
111
- {
112
- id: "UBERON:0001347",
113
- name: "white adipose tissue",
114
- showAtZoom: 6
115
- },
116
- {
117
- id: "UBERON:0001556",
118
- name: "lower urinary tract",
119
- showAtZoom: 1
120
- },
121
- {
122
- id: "UBERON:0002262",
123
- name: "celiac ganglion",
124
- showAtZoom: 5
125
- },
126
- {
127
- id: "UBERON:0000955",
128
- name: "Brain",
129
- showAtZoom: 1
130
- },
131
- {
132
- id: "UBERON:0000160",
133
- name: "intestine",
134
- showAtZoom: 1
135
- },
136
- {
137
- id: "UBERON:0001322",
138
- name: "sciatic nerve",
139
- showAtZoom: 1
140
- },
141
- {
142
- id: "UBERON:0001649",
143
- name: "glossopharyngeal nerve",
144
- showAtZoom: 6
145
- },
146
- {
147
- id: "UBERON:0002063",
148
- name: "sinus venosus",
149
- showAtZoom: 6
150
- },
151
- {
152
- id: "UBERON:0002107",
153
- name: "liver",
154
- showAtZoom: 1
155
- },
156
- {
157
- id: "UBERON:0002113",
158
- name: "kidney",
159
- showAtZoom: 1
160
- },
161
- {
162
- id: "UBERON:0002481",
163
- name: "bone tissue",
164
- showAtZoom: 1
165
- },
166
- {
167
- id: "UBERON:0004907",
168
- name: "lower digestive tract",
169
- showAtZoom: 4
170
- },
171
- {
172
- id: "UBERON:0000044",
173
- name: "Dorsal root ganglion",
174
- showAtZoom: 5
175
- },
176
- // New levels from Keeran
177
- {
178
- id: "UBERON:0001736",
179
- name: "Submandibular gland",
180
- showAtZoom: c,
181
- keyword: !0
182
- },
183
- {
184
- id: "UBERON:0001103",
185
- name: "Diaphragm",
186
- showAtZoom: s,
187
- keyword: !0
188
- },
189
- {
190
- id: "UBERON:0001160",
191
- name: "Fundus of stomach",
192
- showAtZoom: s,
193
- keyword: !0
194
- },
195
- {
196
- id: "UBERON:0000955",
197
- name: "Brain",
198
- showAtZoom: s,
199
- keyword: !0
200
- },
201
- {
202
- id: "UBERON:0003708",
203
- name: "Carotid sinus",
204
- showAtZoom: c,
205
- keyword: !0
206
- },
207
- {
208
- id: "UBERON:0002079",
209
- name: "Left cardiac atrium",
210
- showAtZoom: s,
211
- keyword: !0
212
- },
213
- {
214
- id: "ILX:0485722",
215
- name: "Nodose ganglion",
216
- showAtZoom: c,
217
- keyword: !0
218
- },
219
- {
220
- id: "UBERON:0002078",
221
- name: "Right cardiac atrium",
222
- showAtZoom: s,
223
- keyword: !0
224
- },
225
- {
226
- id: "UBERON:0002084",
227
- name: "Heart left ventricle",
228
- showAtZoom: s,
229
- keyword: !0
230
- },
231
- {
232
- id: "UBERON:0002080",
233
- name: "Heart right ventricle",
234
- showAtZoom: s,
235
- keyword: !0
236
- },
237
- {
238
- id: "UBERON:0001508",
239
- name: "Arch of Aorta",
240
- showAtZoom: s,
241
- keyword: !0
242
- },
243
- {
244
- id: "UBERON:0001738",
245
- name: "Thyroid cartilage",
246
- showAtZoom: s,
247
- keyword: !0
248
- },
249
- {
250
- id: "UBERON:0000388",
251
- name: "Epiglottis",
252
- showAtZoom: s,
253
- keyword: !0
254
- }
255
- ];
256
- function N(e) {
2
+ import { u as d, d as u, E as r, T as p, e as h, f as m } from "./index-DkVmhrWU.js";
3
+ import { mapStores as g } from "pinia";
4
+ function y(e) {
257
5
  return e[0].toUpperCase() + e.substring(1);
258
6
  }
259
- const B = {
7
+ const w = {
260
8
  emits: ["flatmap-provenance-ready", "resource-selected", "species-changed"],
261
9
  props: {
262
10
  /**
@@ -274,7 +22,7 @@ const B = {
274
22
  }
275
23
  },
276
24
  computed: {
277
- ...A(p, g),
25
+ ...g(d, u),
278
26
  idNamePair() {
279
27
  return this.splitFlowStore.idNamePair;
280
28
  },
@@ -292,7 +40,7 @@ const B = {
292
40
  }
293
41
  },
294
42
  mounted: function() {
295
- l.on("startHelp", () => {
43
+ r.on("startHelp", () => {
296
44
  this.startHelp();
297
45
  }), this.multiflatmapRef = this.$refs.multiflatmap, this.flatmapRef = this.$refs.flatmap, this.scaffoldRef = this.$refs.scaffold;
298
46
  },
@@ -302,10 +50,13 @@ const B = {
302
50
  getState: function() {
303
51
  },
304
52
  openMap: function(e) {
305
- e === "SYNC" ? (this.toggleSyncMode(), this.trackOpenMap("toggle_map_sync_mode")) : (l.emit("OpenNewMap", e), this.trackOpenMap(`open_new_${e}_map`)), this.onConnectivityInfoClose();
53
+ e === "SYNC" ? (this.toggleSyncMode(), this.trackOpenMap("toggle_map_sync_mode")) : (r.emit("OpenNewMap", e), this.trackOpenMap(`open_new_${e}_map`)), this.onConnectivityInfoClose();
54
+ },
55
+ onMapmanagerLoaded: function(e) {
56
+ this.settingsStore.updateMapManager(e);
306
57
  },
307
58
  trackOpenMap: function(e) {
308
- y.sendEvent({
59
+ p.sendEvent({
309
60
  event: "interaction_event",
310
61
  event_name: "portal_maps_open_map",
311
62
  category: e,
@@ -329,12 +80,12 @@ const B = {
329
80
  * Callback when the vuers emit a selected event.
330
81
  */
331
82
  resourceSelected: function(e, t) {
332
- var o, r, f;
83
+ var n, o, l, f;
333
84
  if (this.resourceHasAction(t)) {
334
- l.emit("PopoverActionClick", t);
85
+ r.emit("PopoverActionClick", t);
335
86
  return;
336
87
  }
337
- let i, n = !1;
88
+ let i, s = !1;
338
89
  const a = {
339
90
  paneIndex: this.entry.id,
340
91
  type: e,
@@ -343,11 +94,9 @@ const B = {
343
94
  eventType: void 0
344
95
  };
345
96
  if (e == "MultiFlatmap" || e == "Flatmap")
346
- if (a.internalName = this.idNamePair[t.feature.models], t.eventType == "click")
97
+ if (a.internalName = (n = t == null ? void 0 : t.feature) != null && n.label ? t.feature.label : this.idNamePair[t.feature.models], t.eventType == "click")
347
98
  if (a.eventType = "selected", t.feature.type == "marker") {
348
- let d = this.idNamePair[t.feature.models], u = v.filter(
349
- (h) => h.id === t.feature.models
350
- );
99
+ let c = a.internalName;
351
100
  this.settingsStore.isFeaturedMarkerIdentifier(
352
101
  t.feature.id
353
102
  ) ? i = {
@@ -356,24 +105,21 @@ const B = {
356
105
  t.feature.id
357
106
  ),
358
107
  featuredDataset: !0
359
- } : u.filter((h) => h.keyword).length > 0 ? i = {
360
- type: "Search",
361
- term: "http://purl.obolibrary.org/obo/" + t.feature.models.replace(":", "_")
362
108
  } : i = {
363
109
  type: "Facet",
364
- facet: d,
110
+ facet: c,
365
111
  facetPropPath: "anatomy.organ.category.name",
366
112
  term: "Anatomical structure"
367
- }, n = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
368
- } else t.feature.type == "feature" && this.syncMode && (n = !0);
369
- else t.eventType == "mouseenter" && (a.eventType = "highlighted", n = !0);
370
- else e == "Scaffold" && (t && t[0] && ((((o = t[0].data) == null ? void 0 : o.id) === void 0 || ((r = t[0].data) == null ? void 0 : r.id) === "") && (t[0].data.id = (f = t[0].data) == null ? void 0 : f.group), a.internalName = t[0].data.id, t[0].data.lastActionOnMarker === !0 && (i = {
113
+ }, s = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
114
+ } else t.feature.type == "feature" && this.syncMode && (s = !0);
115
+ else t.eventType == "mouseenter" && (a.eventType = "highlighted", s = !0);
116
+ else e == "Scaffold" && (t && t[0] && ((((o = t[0].data) == null ? void 0 : o.id) === void 0 || ((l = t[0].data) == null ? void 0 : l.id) === "") && (t[0].data.id = (f = t[0].data) == null ? void 0 : f.group), a.internalName = t[0].data.id, t[0].data.lastActionOnMarker === !0 && (i = {
371
117
  type: "Facet",
372
- facet: N(t[0].data.id),
118
+ facet: y(t[0].data.id),
373
119
  facetPropPath: "anatomy.organ.category.name",
374
120
  term: "Anatomical structure"
375
- })), a.eventType = "selected", n = !0);
376
- i && l.emit("PopoverActionClick", i), n && this.$emit("resource-selected", a);
121
+ })), a.eventType = "selected", s = !0);
122
+ i && r.emit("PopoverActionClick", i), s && this.$emit("resource-selected", a);
377
123
  },
378
124
  resourceHasAction: function(e) {
379
125
  return e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets";
@@ -398,24 +144,24 @@ const B = {
398
144
  if (e.resource && e.resource.resource && (i = e.resource.resource[0]), this.entry.type === "Scaffold") {
399
145
  if (this.$refs.scaffold.findObjectsWithGroupName(t).length === 0) {
400
146
  if (e.resource && e.resource.feature) {
401
- const o = m(e.resource.feature.models);
402
- if (o.length > 0) return o;
147
+ const n = h(e.resource.feature.models);
148
+ if (n.length > 0) return n;
403
149
  }
404
- let a = w(t);
150
+ let a = m(t);
405
151
  if (a)
406
152
  return a;
407
153
  if (i && e.eventType === "selected")
408
- return fetch(`${this.apiLocation}get-related-terms/${i}`).then((o) => o.json()).then((o) => {
409
- if (o.uberon.array.length > 0)
410
- return t = o.uberon.array[0].name.charAt(0).toUpperCase() + o.uberon.array[0].name.slice(1), i = o.uberon.array[0].id.toUpperCase(), { id: i, name: t };
154
+ return fetch(`${this.apiLocation}get-related-terms/${i}`).then((n) => n.json()).then((n) => {
155
+ if (n.uberon.array.length > 0)
156
+ return t = n.uberon.array[0].name.charAt(0).toUpperCase() + n.uberon.array[0].name.slice(1), i = n.uberon.array[0].id.toUpperCase(), { id: i, name: t };
411
157
  });
412
158
  }
413
159
  } else if (this.entry.type === "MultiFlatmap")
414
160
  if (t === "Bladder")
415
161
  t = "Urinary Bladder";
416
162
  else {
417
- const n = m(t);
418
- n.length > 0 && (t = n[0]);
163
+ const s = h(t);
164
+ s.length > 0 && (t = s[0]);
419
165
  }
420
166
  return { id: i, name: t };
421
167
  },
@@ -423,11 +169,11 @@ const B = {
423
169
  getDatasetAnatomyInfo: function(e) {
424
170
  fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then((t) => t.json()).then((t) => {
425
171
  const i = t.result[0];
426
- let n;
172
+ let s;
427
173
  try {
428
- n = i.anatomy.organ[0].curie;
174
+ s = i.anatomy.organ[0].curie;
429
175
  } catch {
430
- n = void 0;
176
+ s = void 0;
431
177
  }
432
178
  let a;
433
179
  try {
@@ -435,21 +181,21 @@ const B = {
435
181
  } catch {
436
182
  a = void 0;
437
183
  }
438
- let o;
184
+ let n;
439
185
  try {
440
- let r = 0, f = !1;
441
- for (; !f && r < i.organisms.subject.length; ) {
442
- const d = i.organisms.subject[r];
443
- d.species && (o = d.species.name, f = !0), r += 1;
186
+ let o = 0, l = !1;
187
+ for (; !l && o < i.organisms.subject.length; ) {
188
+ const f = i.organisms.subject[o];
189
+ f.species && (n = f.species.name, l = !0), o += 1;
444
190
  }
445
191
  } catch {
446
- o = void 0;
192
+ n = void 0;
447
193
  }
448
194
  this.settingsStore.updateFeaturedMarker({
449
195
  identifier: e,
450
- marker: n,
196
+ marker: s,
451
197
  doi: a,
452
- species: o
198
+ species: n
453
199
  });
454
200
  });
455
201
  },
@@ -542,19 +288,19 @@ const B = {
542
288
  }
543
289
  },
544
290
  onAnnotationOpen: function(e) {
545
- l.emit("annotation-open", e);
291
+ r.emit("annotation-open", e);
546
292
  },
547
293
  onAnnotationClose: function() {
548
- l.emit("annotation-close");
294
+ r.emit("annotation-close");
549
295
  },
550
296
  onConnectivityInfoOpen: function(e) {
551
- l.emit("connectivity-info-open", e);
297
+ r.emit("connectivity-info-open", e);
552
298
  },
553
299
  onConnectivityInfoClose: function() {
554
- l.emit("connectivity-info-close");
300
+ r.emit("connectivity-info-close");
555
301
  },
556
302
  onConnectivityGraphError: function(e) {
557
- l.emit("connectivity-graph-error", e);
303
+ r.emit("connectivity-graph-error", e);
558
304
  }
559
305
  },
560
306
  data: function() {
@@ -575,11 +321,12 @@ const B = {
575
321
  scaffoldRef: null,
576
322
  scaffoldLoaded: !1,
577
323
  isInHelp: !1,
578
- hoverDelay: void 0
324
+ hoverDelay: void 0,
325
+ mapManager: void 0
579
326
  };
580
327
  },
581
328
  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);
329
+ 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
330
  },
584
331
  watch: {
585
332
  helpMode: function(e) {
@@ -588,5 +335,5 @@ const B = {
588
335
  }
589
336
  };
590
337
  export {
591
- B as C
338
+ w as C
592
339
  };