@abi-software/flatmapvuer 1.13.3 → 1.13.4-simulation.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.13.3",
3
+ "version": "1.13.4-simulation.0",
4
4
  "license": "Apache-2.0",
5
5
  "files": [
6
6
  "dist/*",
@@ -44,7 +44,7 @@
44
44
  "./src/*": "./src/*"
45
45
  },
46
46
  "dependencies": {
47
- "@abi-software/map-utilities": "1.8.2",
47
+ "@abi-software/map-utilities": "1.8.3",
48
48
  "@abi-software/sparc-annotation": "0.3.2",
49
49
  "@abi-software/svg-sprite": "1.0.3",
50
50
  "@element-plus/icons-vue": "^2.3.1",
package/src/App.vue CHANGED
@@ -80,6 +80,7 @@
80
80
  :enableOpenMapUI="true"
81
81
  :flatmapAPI="flatmapAPI"
82
82
  :disableUI="disableUI"
83
+ :sparcAPI="sparcAPI"
83
84
  @open-pubmed-url="onOpenPubmedUrl"
84
85
  @pathway-selection-changed="onPathwaySelectionChanged"
85
86
  @flatmapChanged="onFlatmapChanged"
@@ -231,6 +232,15 @@ export default {
231
232
  }
232
233
  },
233
234
  },
235
+ computed : {
236
+ testDataLocation() {
237
+ return import.meta.env.VITE_TEST_DATA_LOCATION
238
+
239
+ },
240
+ sparcAPI() {
241
+ return import.meta.env.VITE_API_LOCATION
242
+ },
243
+ },
234
244
  provide() {
235
245
  return {
236
246
  $annotator: this.annotator,
@@ -290,6 +300,10 @@ export default {
290
300
  "taxo": "NCBITaxon:1",
291
301
  "displayWarning": true
292
302
  },
303
+ FC: {
304
+ taxo: 'FC',
305
+ uuid: "7720709d-683c-5def-a1e5-8d7c3b0784f7",
306
+ },
293
307
  },
294
308
  tooltipContent: undefined,
295
309
  tStyle: {
@@ -3,3 +3,15 @@
3
3
  @import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
4
4
 
5
5
  $--color-primary: $app-primary-color !default;
6
+
7
+ .flatmap-dropdown {
8
+ min-width: 160px !important;
9
+ .el-select-dropdown__item {
10
+ white-space: nowrap;
11
+ text-align: left;
12
+ &.is-selected {
13
+ color: $app-primary-color;
14
+ font-weight: normal;
15
+ }
16
+ }
17
+ }
@@ -314,7 +314,7 @@ Please use `const` to assign meaningful names to them...
314
314
  />
315
315
  <selections-group
316
316
  v-if="containsAlert && alertOptions && showPathwayFilter"
317
- title="Alert"
317
+ title="Notes"
318
318
  labelKey="label"
319
319
  identifierKey="key"
320
320
  :selections="alertOptions"
@@ -106,6 +106,7 @@
106
106
  import { markRaw } from 'vue'
107
107
  import EventBus from './EventBus'
108
108
  import FlatmapVuer from './FlatmapVuer.vue'
109
+ import FlatmapError from './FlatmapError.vue'
109
110
  import flatmap from '../services/flatmapLoader.js'
110
111
  import {
111
112
  ElCol as Col,
@@ -135,6 +136,7 @@ export default {
135
136
  Select,
136
137
  Popover,
137
138
  FlatmapVuer,
139
+ FlatmapError,
138
140
  },
139
141
  created: function () {
140
142
  this.loadMapManager();
@@ -1,6 +1,20 @@
1
1
  // The Vue build version to load with the `import` command
2
2
  // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
- import FlatmapVuer from "./FlatmapVuer.vue";
4
- import MultiFlatmapVuer from "./MultiFlatmapVuer.vue";
3
+ import FlatmapVuer from './FlatmapVuer.vue'
4
+ import MultiFlatmapVuer from './MultiFlatmapVuer.vue'
5
+ import { FlatmapQueries } from '../services/flatmapQueries.js'
6
+ import {
7
+ getKnowledgeSource,
8
+ getKnowledgeSourceFromProvenance,
9
+ loadAndStoreKnowledge,
10
+ } from '../services/flatmapKnowledge.js'
5
11
 
6
- export { FlatmapVuer, MultiFlatmapVuer };
12
+ export {
13
+ FlatmapQueries,
14
+ FlatmapVuer,
15
+ getKnowledgeSource,
16
+ getKnowledgeSourceFromProvenance,
17
+ loadAndStoreKnowledge,
18
+ MultiFlatmapVuer,
19
+ }
20
+ // export { FlatmapVuer, MultiFlatmapVuer };
@@ -0,0 +1,40 @@
1
+ const resolveURL = (relative, base) => {
2
+ const resolved = new URL(relative, base);
3
+ return resolved.href;
4
+ }
5
+
6
+ const retrieveOmexData = async (url, uuid) => {
7
+ if (url) {
8
+ const response = await fetch(url);
9
+ const data = await response.json();
10
+ const simulation = [];
11
+ for (const entry of data) {
12
+ let found = false;
13
+ if (entry.flatmaps) {
14
+ for (const flatmap of entry.flatmaps) {
15
+ if (flatmap.associated_flatmap?.identifier === uuid) {
16
+ found = true;
17
+ }
18
+ }
19
+ }
20
+ if (found && ('simulation' in entry)) {
21
+ entry.simulation.forEach((item) => {
22
+ if (item.resource?.url) {
23
+ item.resource.url = resolveURL(item.resource.url, url);
24
+ }
25
+ item.datasetId = entry.datasetId;
26
+ });
27
+ simulation.push(...entry.simulation);
28
+ }
29
+ }
30
+ if (simulation.length) {
31
+ return {testData: true, simulation};
32
+ }
33
+ }
34
+ return undefined;
35
+ }
36
+
37
+
38
+ export {
39
+ retrieveOmexData,
40
+ };
@@ -141,6 +141,7 @@ export {
141
141
  getReferenceConnectivitiesFromStorage,
142
142
  getReferenceConnectivitiesByAPI,
143
143
  loadAndStoreKnowledge,
144
+ getFlatmapKnowledge,
144
145
  getKnowledgeSource,
145
146
  getKnowledgeSourceFromProvenance,
146
147
  refreshFlatmapKnowledgeCache,
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * a single source for the flatmap-viewer library import
3
3
  */
4
- import * as flatmap from 'https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.4.3/+esm';
4
+ import * as flatmap from 'https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.6.4/+esm';
5
5
 
6
6
  export default flatmap;