@abi-software/mapintegratedvuer 1.7.1-beta.0 → 1.7.2

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.7.1-beta.0",
3
+ "version": "1.7.2",
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.7.2",
54
- "@abi-software/map-side-bar": "2.6.2",
55
- "@abi-software/map-utilities": "1.3.1",
53
+ "@abi-software/flatmapvuer": "1.7.3",
54
+ "@abi-software/map-side-bar": "2.6.3",
55
+ "@abi-software/map-utilities": "1.3.2",
56
56
  "@abi-software/plotvuer": "^1.0.3",
57
- "@abi-software/scaffoldvuer": "1.7.1",
57
+ "@abi-software/scaffoldvuer": "1.7.2",
58
58
  "@abi-software/simulationvuer": "1.0.1",
59
59
  "@abi-software/sparc-annotation": "0.3.2",
60
60
  "@abi-software/svg-sprite": "^1.0.1",
package/src/App.vue CHANGED
@@ -20,7 +20,6 @@
20
20
  <el-button @click="setMultiFlatmap()" size="small">Set MultiFlatmap</el-button>
21
21
  <el-button @click="setLegacyMultiFlatmap()" size="small">Set Legacy MultiFlatmap</el-button>
22
22
  <el-button @click="setScaffold()" size="small">Set To Scaffold</el-button>
23
- <el-button @click="setWholebody()" size="small">Set to Wholebody</el-button>
24
23
  <el-button @click="setFlatmap()" size="small">Set Flatmap</el-button>
25
24
  <el-button @click="setSearch()" size="small">Set Search</el-button>
26
25
  </el-row>
@@ -167,15 +166,6 @@ export default {
167
166
  }
168
167
  );
169
168
  },
170
- setWholebody: function() {
171
- this.$refs.map.setCurrentEntry(
172
- {
173
- type: "Scaffold",
174
- label: "Human",
175
- isBodyScaffold: true
176
- }
177
- );
178
- },
179
169
  setSearch: function() {
180
170
  this.$refs.map.openSearch([], "10.26275/1uno-tynt");
181
171
  },
@@ -27,7 +27,7 @@ import { useSettingsStore } from '../stores/settings';
27
27
  import { useSplitFlowStore } from '../stores/splitFlow';
28
28
  import { findSpeciesKey } from './scripts/utilities.js';
29
29
  import { MapSvgSpriteColor} from '@abi-software/svg-sprite';
30
- import { initialState, getBodyScaffoldInfo } from "./scripts/utilities.js";
30
+ import { initialState } from "./scripts/utilities.js";
31
31
  import RetrieveContextCardMixin from "../mixins/RetrieveContextCardMixin.js"
32
32
  import {
33
33
  ElLoading as Loading
@@ -201,7 +201,7 @@ export default {
201
201
  */
202
202
  setCurrentEntry: async function(state) {
203
203
  if (state && state.type) {
204
- if (state.type === "Scaffold" && (state.url || state.isBodyScaffold)) {
204
+ if (state.type === "Scaffold" && state.url) {
205
205
  //State for scaffold containing the following items:
206
206
  // label - Setting the name of the dialog
207
207
  // region - Which region/group currently focusing on
@@ -216,67 +216,52 @@ export default {
216
216
  state: state.state,
217
217
  viewUrl: state.viewUrl
218
218
  };
219
- if (state.isBodyScaffold) {
220
- const data = await getBodyScaffoldInfo(this.options.sparcApi, state.label);
221
- newView = { ...newView, ...data.datasetInfo, resource: data.url };
222
- } else {
223
- // Add content from scicrunch for the context card
224
- const contextCardInfo = await this.retrieveContextCardFromUrl(state.url);
225
- newView = { ...newView, ...contextCardInfo };
226
- }
219
+ // Add content from scicrunch for the context card
220
+ const contextCardInfo = await this.retrieveContextCardFromUrl(state.url);
221
+ newView = {...newView, ...contextCardInfo};
227
222
  this.$refs.flow.createNewEntry(newView);
228
223
  } else if (state.type === "MultiFlatmap") {
229
- if (state.resource) {
230
- //State for new multiflatmap containing the following items:
231
- // label - Setting the name of the dialog
232
- // resource - the url to metadata
233
- // state - state to restore (viewport)
234
- const newView = {
235
- type: state.type,
236
- resource: state.resource,
237
- state: state.state,
238
- label: state.label
239
- };
240
- this.$refs.flow.createNewEntry(newView);
241
- } else {
242
- //State for multiflatmap containing the following items:
243
- // taxo - taxo of species to set
244
- // biologicalSex - biological sex to be displayed (PATO)
245
- // organ - Target organ, flatmap will conduct a local search
246
- // using this
247
-
248
- //Look for the key in the available species array,
249
- //it will use the taxo and biologicalSex as hints.
250
- const key = findSpeciesKey(state);
251
- if (key) {
252
- const currentState = this.getState();
253
- if (currentState && currentState.entries) {
254
- for (let i = 0; i < currentState.entries.length; i++) {
255
- const entry = currentState.entries[i];
256
- if (entry.type === "MultiFlatmap") {
257
- entry.resource = key;
258
- entry.state = { species: key };
259
- if (state.organ || state.uuid) {
260
- entry.state.state = { searchTerm: state.organ, uuid: state.uuid };
261
- //if it contains an uuid, use the taxo to help identify if the uuid
262
- //is current
263
- if (state.uuid) entry.state.state.entry = state.taxo;
264
- }
265
- this.$refs.flow.setState(currentState);
266
- //Do not create a new entry, instead set the multiflatmap viewer
267
- //to the primary slot
268
- this.$refs.flow.setIdToPrimaryPane(entry.id);
269
- break;
224
+ //State for scaffold containing the following items:
225
+ // label - Setting the name of the dialog
226
+ // taxo - taxo of species to set
227
+ // biologicalSex - biological sex to be displayed (PATO)
228
+ // organ - Target organ, flatmap will conduct a local search
229
+ // using this
230
+
231
+ //Look for the key in the available species array,
232
+ //it will use the taxo and biologicalSex as hints.
233
+ const key = findSpeciesKey(state);
234
+ if (key) {
235
+ const currentState = this.getState();
236
+ if (currentState && currentState.entries) {
237
+ for (let i = 0; i < currentState.entries.length; i++) {
238
+ const entry = currentState.entries[i];
239
+ if (entry.type === "MultiFlatmap") {
240
+ entry.resource = key;
241
+ entry.state = {species: key};
242
+ if (state.organ || state.uuid) {
243
+ entry.state.state = { searchTerm: state.organ, uuid: state.uuid };
244
+ //if it contains an uuid, use the taxo to help identify if the uuid
245
+ //is current
246
+ if (state.uuid) entry.state.state.entry = state.taxo;
270
247
  }
248
+ this.$refs.flow.setState(currentState);
249
+ //Do not create a new entry, instead set the multiflatmap viewer
250
+ //to the primary slot
251
+ this.$refs.flow.setIdToPrimaryPane(entry.id);
252
+ break;
271
253
  }
272
254
  }
273
255
  }
274
256
  }
275
- } else if (state.type === "Flatmap") {
276
- //State for flatmap containing the following items:
257
+ }
258
+ else if (state.type === "Flatmap") {
259
+ //State for scaffold containing the following items:
277
260
  // label - Setting the name of the dialog
261
+ // region - Which region/group currently focusing on
278
262
  // resource - the url to metadata
279
263
  // state - state to restore (viewport)
264
+ // viewUrl - relative path of the view file to metadata
280
265
  const newView = {
281
266
  type: state.type,
282
267
  resource: state.resource,