@abi-software/flatmapvuer 1.13.3-demo.1 → 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/dist/flatmapvuer.js +236 -267
- package/dist/flatmapvuer.umd.cjs +11 -11
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +14 -0
- package/src/assets/styles.scss +12 -0
- package/src/components/FlatmapVuer.vue +1 -29
- package/src/components/MultiFlatmapVuer.vue +2 -14
- package/src/components/index.js +17 -3
- package/src/services/apsTestData.js +40 -0
- package/src/services/flatmapKnowledge.js +1 -0
- package/src/services/flatmapLoader.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "1.13.
|
|
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.
|
|
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: {
|
package/src/assets/styles.scss
CHANGED
|
@@ -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="
|
|
317
|
+
title="Notes"
|
|
318
318
|
labelKey="label"
|
|
319
319
|
identifierKey="key"
|
|
320
320
|
:selections="alertOptions"
|
|
@@ -1283,11 +1283,6 @@ export default {
|
|
|
1283
1283
|
if (this.$refs.pathwaysSelection) {
|
|
1284
1284
|
this.$refs.pathwaysSelection.reset()
|
|
1285
1285
|
}
|
|
1286
|
-
|
|
1287
|
-
this.trackEvent({
|
|
1288
|
-
'event_name': `portal_maps_zoom`,
|
|
1289
|
-
'category': 'reset',
|
|
1290
|
-
});
|
|
1291
1286
|
}
|
|
1292
1287
|
},
|
|
1293
1288
|
/**
|
|
@@ -1298,11 +1293,6 @@ export default {
|
|
|
1298
1293
|
zoomIn: function () {
|
|
1299
1294
|
if (this.mapImp) {
|
|
1300
1295
|
this.mapImp.zoomIn()
|
|
1301
|
-
|
|
1302
|
-
this.trackEvent({
|
|
1303
|
-
'event_name': `portal_maps_zoom`,
|
|
1304
|
-
'category': 'zoom_in',
|
|
1305
|
-
});
|
|
1306
1296
|
}
|
|
1307
1297
|
},
|
|
1308
1298
|
/**
|
|
@@ -1313,11 +1303,6 @@ export default {
|
|
|
1313
1303
|
zoomOut: function () {
|
|
1314
1304
|
if (this.mapImp) {
|
|
1315
1305
|
this.mapImp.zoomOut()
|
|
1316
|
-
|
|
1317
|
-
this.trackEvent({
|
|
1318
|
-
'event_name': `portal_maps_zoom`,
|
|
1319
|
-
'category': 'zoom_out',
|
|
1320
|
-
});
|
|
1321
1306
|
}
|
|
1322
1307
|
},
|
|
1323
1308
|
onSelectionsDataChanged: function (data) {
|
|
@@ -3168,19 +3153,6 @@ export default {
|
|
|
3168
3153
|
setConnectionType: function (type) {
|
|
3169
3154
|
this.connectionType = type;
|
|
3170
3155
|
},
|
|
3171
|
-
/**
|
|
3172
|
-
* @public
|
|
3173
|
-
* Function to track events.
|
|
3174
|
-
* @arg {Object} `data`
|
|
3175
|
-
*/
|
|
3176
|
-
trackEvent: function (data) {
|
|
3177
|
-
const taggingData = {
|
|
3178
|
-
'event': 'interaction_event',
|
|
3179
|
-
'location': 'flatmap',
|
|
3180
|
-
...data,
|
|
3181
|
-
};
|
|
3182
|
-
this.$emit('trackEvent', taggingData);
|
|
3183
|
-
},
|
|
3184
3156
|
},
|
|
3185
3157
|
props: {
|
|
3186
3158
|
/**
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
:showLocalSettings="showLocalSettings"
|
|
94
94
|
:showOpenMapButton="showOpenMapButton"
|
|
95
95
|
:showPathwayFilter="showPathwayFilter"
|
|
96
|
-
@trackEvent="trackEvent"
|
|
97
96
|
:externalLegends="externalLegends"
|
|
98
97
|
/>
|
|
99
98
|
|
|
@@ -107,6 +106,7 @@
|
|
|
107
106
|
import { markRaw } from 'vue'
|
|
108
107
|
import EventBus from './EventBus'
|
|
109
108
|
import FlatmapVuer from './FlatmapVuer.vue'
|
|
109
|
+
import FlatmapError from './FlatmapError.vue'
|
|
110
110
|
import flatmap from '../services/flatmapLoader.js'
|
|
111
111
|
import {
|
|
112
112
|
ElCol as Col,
|
|
@@ -136,6 +136,7 @@ export default {
|
|
|
136
136
|
Select,
|
|
137
137
|
Popover,
|
|
138
138
|
FlatmapVuer,
|
|
139
|
+
FlatmapError,
|
|
139
140
|
},
|
|
140
141
|
created: function () {
|
|
141
142
|
this.loadMapManager();
|
|
@@ -644,19 +645,6 @@ export default {
|
|
|
644
645
|
let map = this.getCurrentFlatmap();
|
|
645
646
|
map.setConnectionType(type);
|
|
646
647
|
},
|
|
647
|
-
/**
|
|
648
|
-
* @public
|
|
649
|
-
* Function to track events.
|
|
650
|
-
* @arg {Object} `data`
|
|
651
|
-
*/
|
|
652
|
-
trackEvent: function (data) {
|
|
653
|
-
const taggingData = {
|
|
654
|
-
'event': 'interaction_event',
|
|
655
|
-
'location': 'flatmap',
|
|
656
|
-
...data,
|
|
657
|
-
};
|
|
658
|
-
this.$emit('trackEvent', taggingData);
|
|
659
|
-
},
|
|
660
648
|
},
|
|
661
649
|
props: {
|
|
662
650
|
/**
|
package/src/components/index.js
CHANGED
|
@@ -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
|
|
4
|
-
import MultiFlatmapVuer from
|
|
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 {
|
|
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
|
+
};
|
|
@@ -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
|
|
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;
|