@abi-software/flatmapvuer 1.3.2-beta.1 → 1.3.2-isan.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/flatmapvuer",
3
- "version": "1.3.2-beta.1",
3
+ "version": "1.3.2-isan.0",
4
4
  "license": "Apache-2.0",
5
5
  "files": [
6
6
  "dist/*",
@@ -43,7 +43,7 @@
43
43
  "./src/*": "./src/*"
44
44
  },
45
45
  "dependencies": {
46
- "@abi-software/flatmap-viewer": "2.9.5",
46
+ "@abi-software/flatmap-viewer": "^3.0.1",
47
47
  "@abi-software/map-utilities": "1.0.0",
48
48
  "@abi-software/sparc-annotation": "0.3.1",
49
49
  "@abi-software/svg-sprite": "1.0.0",
package/src/App.vue CHANGED
@@ -265,6 +265,10 @@ export default {
265
265
  taxo: 'FunctionalConnectivity',
266
266
  displayWarning: true,
267
267
  },
268
+ "pmr:CardiovascularModelWithFeedback": {
269
+ flatmapId: "pmr:CardiovascularModelWithFeedback",
270
+ displayWarning: true,
271
+ }
268
272
  },
269
273
  tooltipContent: undefined,
270
274
  tStyle: {
@@ -283,7 +287,8 @@ export default {
283
287
  //flatmapAPI: "https://mapcore-demo.org/current/flatmap/v2/"
284
288
  //flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v3/"
285
289
  //flatmapAPI: "https://mapcoe-demo.org/current/flatmap/v3/",
286
- flatmapAPI: 'https://mapcore-demo.org/devel/flatmap/v4/',
290
+ //flatmapAPI: 'https://mapcore-demo.org/devel/flatmap/v4/',
291
+ flatmapAPI: 'https://mapcore-demo.org/isan/flatmap/',
287
292
  //flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
288
293
  //flatmapAPI: "https://mapcore-demo.org/staging/flatmap/v1/"
289
294
  // flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v1/",
@@ -1617,6 +1617,7 @@ export default {
1617
1617
  const label = data.label
1618
1618
  const resource = [data.models]
1619
1619
  const taxonomy = this.entry
1620
+ const flatmapId = this.flatmapId
1620
1621
  const biologicalSex = this.biologicalSex
1621
1622
  let taxons = undefined
1622
1623
  if (data.taxons) {
@@ -1630,6 +1631,7 @@ export default {
1630
1631
  const payload = {
1631
1632
  dataset: data.dataset,
1632
1633
  biologicalSex: biologicalSex,
1634
+ flatmapId: flatmapId,
1633
1635
  taxonomy: taxonomy,
1634
1636
  resource: resource,
1635
1637
  label: label,
@@ -2127,6 +2129,7 @@ export default {
2127
2129
  if (this.mapImp) {
2128
2130
  let state = {
2129
2131
  entry: this.entry,
2132
+ flatmapId: this.flatmapId,
2130
2133
  viewport: this.mapImp.getState(),
2131
2134
  }
2132
2135
  const identifier = this.mapImp.getIdentifier()
@@ -2147,8 +2150,8 @@ export default {
2147
2150
  if (state) {
2148
2151
  if (
2149
2152
  this.mapImp &&
2150
- state.entry &&
2151
- this.entry == state.entry &&
2153
+ ((state.entry && this.entry == state.entry) ||
2154
+ (state.flatmapId && this.flatmapId == state.flatmapId)) &&
2152
2155
  (!state.biologicalSex || state.biologicalSex === this.biologicalSex)
2153
2156
  ) {
2154
2157
  if (state.viewport) {
@@ -2218,16 +2221,26 @@ export default {
2218
2221
  // @arg identifier.uuid {string} The unique uuid the flatmap. If given then this exact map will
2219
2222
  // be loaded, overriding ``taxon`` and ``biologicalSex``.
2220
2223
 
2221
- let identifier = { taxon: this.entry }
2224
+ let identifier = {}
2225
+ if (this.entry) {
2226
+ identifier.taxon = this.entry
2227
+ } else if (this.flatmapId) {
2228
+ identifier.id = this.flatmapId
2229
+ }
2222
2230
  if (this.uuid) {
2223
2231
  identifier.uuid = this.uuid
2224
2232
  }
2225
- //This now handle the uses of uuid when resuming states
2233
+ //This now handles the uses of uuid when resuming states
2226
2234
  if (state) {
2227
2235
  if (state.uuid) {
2228
2236
  identifier = { uuid: state.uuid }
2229
- } else if (state.entry) {
2230
- identifier.taxon = state.entry
2237
+ } else if (state.entry || state.flatmapId) {
2238
+ if (state.entry) {
2239
+ identifier.taxon = state.entry
2240
+ } else if (state.flatmapId) {
2241
+ identifier.id = state.flatmapId
2242
+ }
2243
+
2231
2244
  if (state.biologicalSex) {
2232
2245
  identifier['biologicalSex'] = state.biologicalSex
2233
2246
  } else if (identifier.taxon === 'NCBITaxon:9606') {
@@ -2242,6 +2255,9 @@ export default {
2242
2255
  identifier['biologicalSex'] = this.biologicalSex
2243
2256
  }
2244
2257
  }
2258
+ if (!identifier.taxon && !identifier.uuid) {
2259
+ identifier = identifier.id;
2260
+ }
2245
2261
 
2246
2262
  let promise1 = this.mapManager.loadMap(
2247
2263
  identifier,
@@ -2326,7 +2342,9 @@ export default {
2326
2342
  //Disable layers for now
2327
2343
  //this.layers = this.mapImp.getLayers();
2328
2344
  this.processSystems(this.mapImp.getSystems())
2329
- this.processTaxon(this.flatmapAPI, this.mapImp.taxonIdentifiers)
2345
+ if (this.mapImp.taxonIdentifiers) {
2346
+ this.processTaxon(this.flatmapAPI, this.mapImp.taxonIdentifiers)
2347
+ }
2330
2348
  this.containsAlert = "alert" in this.mapImp.featureFilterRanges()
2331
2349
  this.addResizeButtonToMinimap()
2332
2350
  this.loading = false
@@ -2433,10 +2451,13 @@ export default {
2433
2451
  /**
2434
2452
  * The taxon identifier of the species represented by the map.
2435
2453
  */
2436
- entry: {
2437
- type: String,
2438
- required: true,
2439
- },
2454
+ entry: String,
2455
+ /**
2456
+ * The ``id`` of the flatmap.
2457
+ * If given then this exact map will be loaded,
2458
+ * overriding ``taxon`` and ``biologicalSex``.
2459
+ */
2460
+ flatmapId: String,
2440
2461
  /**
2441
2462
  * The unique ``uuid`` of the flatmap.
2442
2463
  * If given then this exact map will be loaded,
@@ -43,6 +43,7 @@
43
43
  :key="key"
44
44
  v-show="activeSpecies == key"
45
45
  :entry="item.taxo"
46
+ :flatmapId="item.flatmapId"
46
47
  :uuid="item.uuid"
47
48
  :biologicalSex="item.biologicalSex"
48
49
  :displayWarning="item.displayWarning"
@@ -157,13 +158,15 @@ export default {
157
158
  .then((data) => {
158
159
  //Check each key in the provided availableSpecies against the one
159
160
  Object.keys(this.availableSpecies).forEach((key) => {
160
- // FIrst look through the uuid
161
+ // First look through the uuid
161
162
  const uuid = this.availableSpecies[key].uuid
162
163
  if (uuid && data.map((e) => e.uuid).indexOf(uuid) > 0) {
163
164
  this.speciesList[key] = reactive(this.availableSpecies[key])
164
165
  } else {
165
166
  for (let i = 0; i < data.length; i++) {
166
- if (this.availableSpecies[key].taxo === data[i].taxon) {
167
+ if ((this.availableSpecies[key].taxo && this.availableSpecies[key].taxo === data[i].taxon) ||
168
+ (this.availableSpecies[key].flatmapId && this.availableSpecies[key].flatmapId === data[i].id))
169
+ {
167
170
  if (this.availableSpecies[key].biologicalSex) {
168
171
  if (
169
172
  data[i].biologicalSex &&