@abi-software/flatmapvuer 1.13.1-simulation.6 → 1.13.2-demo.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 +2578 -2897
- package/dist/flatmapvuer.umd.cjs +11 -11
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +0 -14
- package/src/assets/styles.scss +0 -12
- package/src/components/FlatmapVuer.vue +676 -1175
- package/src/components/MultiFlatmapVuer.vue +14 -2
- package/src/components/index.js +3 -17
- package/src/services/flatmapKnowledge.js +0 -1
- package/src/services/flatmapLoader.js +1 -1
- package/src/services/apsTestData.js +0 -40
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
:showLocalSettings="showLocalSettings"
|
|
94
94
|
:showOpenMapButton="showOpenMapButton"
|
|
95
95
|
:showPathwayFilter="showPathwayFilter"
|
|
96
|
+
@trackEvent="trackEvent"
|
|
96
97
|
:externalLegends="externalLegends"
|
|
97
98
|
/>
|
|
98
99
|
|
|
@@ -106,7 +107,6 @@
|
|
|
106
107
|
import { markRaw } from 'vue'
|
|
107
108
|
import EventBus from './EventBus'
|
|
108
109
|
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,7 +136,6 @@ export default {
|
|
|
136
136
|
Select,
|
|
137
137
|
Popover,
|
|
138
138
|
FlatmapVuer,
|
|
139
|
-
FlatmapError,
|
|
140
139
|
},
|
|
141
140
|
created: function () {
|
|
142
141
|
this.loadMapManager();
|
|
@@ -645,6 +644,19 @@ export default {
|
|
|
645
644
|
let map = this.getCurrentFlatmap();
|
|
646
645
|
map.setConnectionType(type);
|
|
647
646
|
},
|
|
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
|
+
},
|
|
648
660
|
},
|
|
649
661
|
props: {
|
|
650
662
|
/**
|
package/src/components/index.js
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
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
|
|
5
|
-
import { FlatmapQueries } from '../services/flatmapQueries.js'
|
|
6
|
-
import {
|
|
7
|
-
getKnowledgeSource,
|
|
8
|
-
getKnowledgeSourceFromProvenance,
|
|
9
|
-
loadAndStoreKnowledge,
|
|
10
|
-
} from '../services/flatmapKnowledge.js'
|
|
3
|
+
import FlatmapVuer from "./FlatmapVuer.vue";
|
|
4
|
+
import MultiFlatmapVuer from "./MultiFlatmapVuer.vue";
|
|
11
5
|
|
|
12
|
-
export {
|
|
13
|
-
FlatmapQueries,
|
|
14
|
-
FlatmapVuer,
|
|
15
|
-
getKnowledgeSource,
|
|
16
|
-
getKnowledgeSourceFromProvenance,
|
|
17
|
-
loadAndStoreKnowledge,
|
|
18
|
-
MultiFlatmapVuer,
|
|
19
|
-
}
|
|
20
|
-
// export { FlatmapVuer, MultiFlatmapVuer };
|
|
6
|
+
export { FlatmapVuer, MultiFlatmapVuer };
|
|
@@ -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
|
+
import * as flatmap from 'https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.4.3/+esm';
|
|
5
5
|
|
|
6
6
|
export default flatmap;
|
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
};
|