@abi-software/mapintegratedvuer 1.3.4-beta.1 → 1.3.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/mapintegratedvuer",
3
- "version": "1.3.4-beta.1",
3
+ "version": "1.3.4",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "serve": "vite --host --force",
@@ -50,11 +50,11 @@
50
50
  "*.js"
51
51
  ],
52
52
  "dependencies": {
53
- "@abi-software/flatmapvuer": "1.3.2-beta.1",
53
+ "@abi-software/flatmapvuer": "^1.3.2",
54
54
  "@abi-software/map-side-bar": "^2.3.1",
55
55
  "@abi-software/map-utilities": "^1.0.0",
56
56
  "@abi-software/plotvuer": "1.0.0",
57
- "@abi-software/scaffoldvuer": "^1.3.2",
57
+ "@abi-software/scaffoldvuer": "^1.3.3",
58
58
  "@abi-software/simulationvuer": "1.0.0",
59
59
  "@abi-software/svg-sprite": "1.0.0",
60
60
  "@element-plus/icons-vue": "^2.3.1",
@@ -308,6 +308,7 @@ export default {
308
308
  this.options.rootUrl ? this.settingsStore.updateRootUrl(this.options.rootUrl) : null
309
309
  }
310
310
  this.splitFlowStore?.reset();
311
+ this.splitFlowStore?.getAvailableTerms(this.settingsStore.sparcApi);
311
312
  },
312
313
  mounted: async function() {
313
314
  EventBus.on("updateShareLinkRequested", () => {
@@ -100,7 +100,6 @@ export default {
100
100
  let provClone = {id: this.entry.id, prov: this.getFlatmapImp().provenance}; //create clone of provenance and add id
101
101
  EventBus.emit("mapImpProv", provClone); // send clone to context card
102
102
  this.$emit("flatmap-provenance-ready", provClone);
103
- this.getAvailableTerms();
104
103
  if (this.entry.resource === "FunctionalConnectivity"){
105
104
  this.flatmapReadyForMarkerUpdates(flatmap);
106
105
  }
@@ -166,7 +165,6 @@ export default {
166
165
  },
167
166
  },
168
167
  mounted: function() {
169
- this.getAvailableTerms();
170
168
  EventBus.on("markerUpdate", () => {
171
169
  this.flatmapMarkerUpdate(undefined);
172
170
  });
@@ -427,9 +427,7 @@ export default {
427
427
  },
428
428
  },
429
429
  mounted: function () {
430
- this.getAvailableTerms();
431
430
  this.getFeaturedDatasets();
432
-
433
431
  EventBus.on('show-connectivity', (payload) => {
434
432
  const { featureIds, offset } = payload;
435
433
  if (this.flatmapReady && this.$refs.multiflatmap) {
@@ -1,5 +1,4 @@
1
1
  import {
2
- getAvailableTermsForSpecies,
3
2
  getInteractiveAction,
4
3
  getNerveNames,
5
4
  getParentsRegion,
@@ -35,6 +34,9 @@ export default {
35
34
  },
36
35
  computed: {
37
36
  ...mapStores(useSettingsStore, useSplitFlowStore),
37
+ idNamePair() {
38
+ return this.splitFlowStore.idNamePair;
39
+ },
38
40
  syncMode() {
39
41
  return this.splitFlowStore.syncMode;
40
42
  },
@@ -397,31 +399,6 @@ export default {
397
399
  requestSynchronisedEvent: function () {
398
400
  return;
399
401
  },
400
- getAvailableTerms: function () {
401
- //Use the default list of uberons before we get the list from
402
- //the api
403
- let terms = getAvailableTermsForSpecies();
404
- for (let i = 0; i < terms.length; i++) {
405
- this.idNamePair[terms[i].id] = terms[i].name;
406
- }
407
- if (this.apiLocation) {
408
- if (this._controller) this._controller.abort();
409
- this._controller = new AbortController();
410
- let signal = this._controller.signal;
411
- fetch(`${this.apiLocation}get-organ-curies`, {
412
- signal,
413
- })
414
- .then(response => response.json())
415
- .then(data => {
416
- this._controller = undefined;
417
- data.uberon.array.forEach(pair => {
418
- this.idNamePair[pair.id.toUpperCase()] =
419
- pair.name.charAt(0).toUpperCase() + pair.name.slice(1);
420
- });
421
- return;
422
- });
423
- }
424
- },
425
402
  flatmapMarkerUpdate() {
426
403
  return;
427
404
  },
@@ -536,7 +513,6 @@ export default {
536
513
  multiflatmapRef: null,
537
514
  flatmapRef: null,
538
515
  scaffoldRef: null,
539
- idNamePair: {},
540
516
  scaffoldLoaded: false,
541
517
  isInHelp: false,
542
518
  hoverDelay: undefined
@@ -1,4 +1,7 @@
1
1
  import { defineStore } from 'pinia';
2
+ import {
3
+ getAvailableTermsForSpecies,
4
+ } from "../components/SimulatedData.js";
2
5
 
3
6
  /* eslint-disable no-alert, no-console */
4
7
  const presetLayouts = (view) => {
@@ -130,6 +133,7 @@ const findKeyWithId = (layout, id) => {
130
133
  const getOriginalState = () => {
131
134
  return {
132
135
  activeView: "singlepanel",
136
+ idNamePair: {},
133
137
  viewIcons: [
134
138
  { icon: "singlepanel", name: "Single view", min: 1 },
135
139
  { icon: "2horpanel", name: "Horizontal split", min: 2 },
@@ -195,6 +199,30 @@ export const useSplitFlowStore = defineStore('splitFlow', {
195
199
  this.customLayout[sourceKey].id = payload.target;
196
200
  }
197
201
  },
202
+ getAvailableTerms(apiLocation) {
203
+ let terms = getAvailableTermsForSpecies();
204
+ for (let i = 0; i < terms.length; i++) {
205
+ this.idNamePair[terms[i].id] = terms[i].name;
206
+ }
207
+ if (apiLocation) {
208
+ if (this._controller) this._controller.abort();
209
+ this._controller = new AbortController();
210
+ let signal = this._controller.signal;
211
+ console.log("getAvailableTerms")
212
+ fetch(`${apiLocation}get-organ-curies`, {
213
+ signal,
214
+ })
215
+ .then(response => response.json())
216
+ .then(data => {
217
+ this._controller = undefined;
218
+ data.uberon.array.forEach(pair => {
219
+ this.idNamePair[pair.id.toUpperCase()] =
220
+ pair.name.charAt(0).toUpperCase() + pair.name.slice(1);
221
+ });
222
+ return;
223
+ });
224
+ }
225
+ },
198
226
  toggleGlobalCallback(flag) {
199
227
  this.globalCallback = flag;
200
228
  },