@abi-software/mapintegratedvuer 1.9.0 → 1.9.1
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/{ContentMixin-DyVwSF4C.js → ContentMixin-c9DvlJVP.js} +46 -43
- package/dist/{Flatmap-DrfTTLeB.js → Flatmap-D66Ygegj.js} +64 -60
- package/dist/{Iframe-DNML_G7u.js → Iframe-DFAzMMSw.js} +2 -2
- package/dist/{MultiFlatmap-Vp10mrjr.js → MultiFlatmap-BOOSKitQ.js} +9 -8
- package/dist/{Plot-BnuX-0LW.js → Plot-DPxSQnwg.js} +2 -2
- package/dist/{Scaffold-CLNZHo3r.js → Scaffold-DRQEE-j_.js} +2 -2
- package/dist/{Simulation-BEU8ep5d.js → Simulation-BVcaSVmW.js} +2 -2
- package/dist/{index-CVfAy4kK.js → index-qckfB1dl.js} +117 -102
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +13 -13
- package/dist/{style-BM2XOQIb.js → style-C6pIyWak.js} +41 -17
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/SplitDialog.vue +3 -15
- package/src/components/SplitFlow.vue +5 -0
- package/src/components/viewers/Flatmap.vue +10 -2
- package/src/components/viewers/MultiFlatmap.vue +1 -0
- package/src/mixins/ContentMixin.js +6 -5
- package/src/stores/connectivities.js +17 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "1.9.
|
3
|
+
"version": "1.9.1",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vite --host --force",
|
@@ -50,8 +50,8 @@
|
|
50
50
|
"*.js"
|
51
51
|
],
|
52
52
|
"dependencies": {
|
53
|
-
"@abi-software/flatmapvuer": "^1.9.
|
54
|
-
"@abi-software/map-side-bar": "^2.8.
|
53
|
+
"@abi-software/flatmapvuer": "^1.9.1",
|
54
|
+
"@abi-software/map-side-bar": "^2.8.1",
|
55
55
|
"@abi-software/map-utilities": "^1.5.0",
|
56
56
|
"@abi-software/plotvuer": "1.0.4",
|
57
57
|
"@abi-software/scaffoldvuer": "^1.9.0",
|
@@ -213,30 +213,18 @@ export default {
|
|
213
213
|
|
214
214
|
// mix connectivites of available maps
|
215
215
|
if (uuids.length) {
|
216
|
-
|
217
|
-
|
218
|
-
const connectivity = this.connectivitiesStore.globalConnectivities[_uuid];
|
219
|
-
combinedConnectivities.push(...connectivity);
|
220
|
-
}
|
221
|
-
});
|
222
|
-
|
223
|
-
const uniqueConnectivities = Array.from(
|
224
|
-
new Map(combinedConnectivities.map((item) => [item.id, item])).values()
|
225
|
-
);
|
216
|
+
this.connectivitiesStore.updateActiveConnectivityKeys(uuids);
|
217
|
+
const uniqueConnectivities = this.connectivitiesStore.getUniqueConnectivitiesByKeys;
|
226
218
|
|
227
219
|
EventBus.emit("connectivity-knowledge", {
|
228
220
|
data: uniqueConnectivities
|
229
221
|
});
|
230
|
-
|
231
|
-
if (uuids.length === 1) {
|
232
|
-
this.connectivitiesStore.updateActiveConnectivityKey(uuid);
|
233
|
-
}
|
234
222
|
} else {
|
235
223
|
if (sckanVersion) {
|
236
224
|
EventBus.emit("connectivity-knowledge", {
|
237
225
|
data: this.connectivitiesStore.globalConnectivities[sckanVersion]
|
238
226
|
});
|
239
|
-
this.connectivitiesStore.
|
227
|
+
this.connectivitiesStore.updateActiveConnectivityKeys([sckanVersion]);
|
240
228
|
} else {
|
241
229
|
console.warn(`There has no connectivity to show!`);
|
242
230
|
}
|
@@ -653,6 +653,11 @@ export default {
|
|
653
653
|
}
|
654
654
|
this.connectivityExplorerClicked.pop();
|
655
655
|
});
|
656
|
+
EventBus.on('connectivity-info-close', payload => {
|
657
|
+
if (this.$refs.sideBar) {
|
658
|
+
this.$refs.sideBar.resetConnectivitySearch();
|
659
|
+
}
|
660
|
+
});
|
656
661
|
EventBus.on('connectivity-error', payload => {
|
657
662
|
if (this.$refs.sideBar) {
|
658
663
|
this.$refs.sideBar.updateConnectivityError(payload.data);
|
@@ -21,7 +21,7 @@
|
|
21
21
|
:annotationSidebar="annotationSidebar"
|
22
22
|
@connectivity-info-open="onConnectivityInfoOpen"
|
23
23
|
@connectivity-error="onConnectivityError"
|
24
|
-
|
24
|
+
@connectivity-info-close="onConnectivityInfoClose"
|
25
25
|
:pathControls="true"
|
26
26
|
ref="flatmap"
|
27
27
|
@ready="flatmapReadyCall"
|
@@ -74,7 +74,7 @@ export default {
|
|
74
74
|
* Perform a local search on this contentvuer
|
75
75
|
*/
|
76
76
|
search: function (term) {
|
77
|
-
return this.$refs.flatmap.searchAndShowResult(term);
|
77
|
+
return this.$refs.flatmap.searchAndShowResult(term, true);
|
78
78
|
},
|
79
79
|
getFlatmapImp() {
|
80
80
|
return this.$refs.flatmap?.mapImp;
|
@@ -102,9 +102,11 @@ export default {
|
|
102
102
|
},
|
103
103
|
flatmapReadyCall: function (flatmap) {
|
104
104
|
let provClone = {id: this.entry.id, prov: this.getFlatmapImp().provenance}; //create clone of provenance and add id
|
105
|
+
const flatmapImp = flatmap.mapImp;
|
105
106
|
EventBus.emit("mapImpProv", provClone); // send clone to context card
|
106
107
|
this.$emit("flatmap-provenance-ready", provClone);
|
107
108
|
this.flatmapReadyForMarkerUpdates(flatmap);
|
109
|
+
this.loadConnectivityKnowledge(flatmapImp);
|
108
110
|
EventBus.emit("mapLoaded", flatmap);
|
109
111
|
},
|
110
112
|
onPathwaySelectionChanged: function (data) {
|
@@ -200,6 +202,12 @@ export default {
|
|
200
202
|
currentFlatmap.showConnectivitiesByReference(payload);
|
201
203
|
}
|
202
204
|
});
|
205
|
+
EventBus.on("connectivity-query-filter", (payload) => {
|
206
|
+
const currentFlatmap = this.$refs.flatmap;
|
207
|
+
if (currentFlatmap && currentFlatmap.mapImp) {
|
208
|
+
this.connectivityQueryFilter(currentFlatmap, payload)
|
209
|
+
}
|
210
|
+
});
|
203
211
|
},
|
204
212
|
};
|
205
213
|
</script>
|
@@ -20,6 +20,7 @@
|
|
20
20
|
:annotationSidebar="annotationSidebar"
|
21
21
|
@connectivity-info-open="onConnectivityInfoOpen"
|
22
22
|
@connectivity-error="onConnectivityError"
|
23
|
+
@connectivity-info-close="onConnectivityInfoClose"
|
23
24
|
:connectivityInfoSidebar="connectivityInfoSidebar"
|
24
25
|
ref="multiflatmap"
|
25
26
|
:displayMinimap="true"
|
@@ -556,6 +556,9 @@ export default {
|
|
556
556
|
onConnectivityError: function (errorInfo) {
|
557
557
|
EventBus.emit('connectivity-error', errorInfo);
|
558
558
|
},
|
559
|
+
onConnectivityInfoClose: function () {
|
560
|
+
EventBus.emit('connectivity-info-close');
|
561
|
+
},
|
559
562
|
loadConnectivityKnowledge: async function (flatmapImp) {
|
560
563
|
const sckanVersion = getKnowledgeSource(flatmapImp);
|
561
564
|
const flatmapQueries = markRaw(new FlatmapQueries());
|
@@ -610,14 +613,12 @@ export default {
|
|
610
613
|
return ids;
|
611
614
|
},
|
612
615
|
connectivityQueryFilter: async function (flatmap, data) {
|
613
|
-
const
|
614
|
-
// to search from sckan or uuid based on the maps showing on split screens
|
615
|
-
const activeConnectivityKey = this.connectivitiesStore.activeConnectivityKey || uuid;
|
616
|
+
const uniqueConnectivities = this.connectivitiesStore.getUniqueConnectivitiesByKeys;
|
616
617
|
// only for those flatmaps that are shown on the split screen
|
617
618
|
if (flatmap.$el.checkVisibility()) {
|
618
619
|
let payload = {
|
619
620
|
state: "default",
|
620
|
-
data: [...
|
621
|
+
data: [...uniqueConnectivities],
|
621
622
|
};
|
622
623
|
if (data) {
|
623
624
|
if (data.type === "query-update") {
|
@@ -638,7 +639,7 @@ export default {
|
|
638
639
|
const ids = [...new Set(nestedIds.flat())];
|
639
640
|
let paths = await flatmap.retrieveConnectedPaths(ids, options);
|
640
641
|
paths = [...ids, ...paths.filter((path) => !ids.includes(path))];
|
641
|
-
let results =
|
642
|
+
let results = uniqueConnectivities.filter((item) => paths.includes(item.id));
|
642
643
|
payload.data = results;
|
643
644
|
}
|
644
645
|
EventBus.emit("connectivity-knowledge", payload);
|
@@ -4,18 +4,32 @@ export const useConnectivitiesStore = defineStore('connectivities', {
|
|
4
4
|
state: () => {
|
5
5
|
return {
|
6
6
|
globalConnectivities: {},
|
7
|
-
|
7
|
+
activeConnectivityKeys: [],
|
8
8
|
}
|
9
9
|
},
|
10
10
|
getters: {
|
11
|
+
getUniqueConnectivitiesByKeys: (state) => {
|
12
|
+
let combinedConnectivities = [];
|
13
|
+
state.activeConnectivityKeys.forEach((uuid) => {
|
14
|
+
if (uuid in state.globalConnectivities) {
|
15
|
+
const connectivity = state.globalConnectivities[uuid];
|
16
|
+
combinedConnectivities.push(...connectivity);
|
17
|
+
}
|
18
|
+
});
|
11
19
|
|
20
|
+
const uniqueConnectivities = Array.from(
|
21
|
+
new Map(combinedConnectivities.map((item) => [item.id, item])).values()
|
22
|
+
);
|
23
|
+
|
24
|
+
return uniqueConnectivities;
|
25
|
+
},
|
12
26
|
},
|
13
27
|
actions: {
|
14
28
|
updateGlobalConnectivities(globalConnectivities) {
|
15
29
|
this.globalConnectivities = globalConnectivities;
|
16
30
|
},
|
17
|
-
|
18
|
-
this.
|
31
|
+
updateActiveConnectivityKeys(activeConnectivityKeys) {
|
32
|
+
this.activeConnectivityKeys = activeConnectivityKeys;
|
19
33
|
},
|
20
34
|
}
|
21
35
|
});
|