@abi-software/mapintegratedvuer 1.9.1 → 1.9.3-beta.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/{ContentMixin-c9DvlJVP.js → ContentMixin-W2PTyJZz.js} +62 -89
- package/dist/{Flatmap-D66Ygegj.js → Flatmap--SlRCdfI.js} +51 -30
- package/dist/{Iframe-DFAzMMSw.js → Iframe-DYGGdodq.js} +2 -2
- package/dist/{MultiFlatmap-BOOSKitQ.js → MultiFlatmap-CEimf8Pc.js} +52 -29
- package/dist/{Plot-DPxSQnwg.js → Plot-x7fR8yUx.js} +2 -2
- package/dist/Scaffold-CfDMtWBm.js +194 -0
- package/dist/{Simulation-BVcaSVmW.js → Simulation-BOhCaUMa.js} +2 -2
- package/dist/{index-qckfB1dl.js → index-DMpfPm6s.js} +19989 -20065
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +226 -6059
- package/dist/style-Ba4Y-S47.js +66 -0
- package/dist/style.css +1 -1
- package/package.json +6 -5
- package/src/App.vue +2 -0
- package/src/assets/header-icon.scss +2 -2
- package/src/components/DialogToolbarContent.vue +434 -18
- package/src/components/MapContent.vue +24 -2
- package/src/components/SplitDialog.vue +128 -2
- package/src/components/SplitFlow.vue +133 -52
- package/src/components/viewers/Flatmap.vue +38 -7
- package/src/components/viewers/MultiFlatmap.vue +52 -6
- package/src/components/viewers/Scaffold.vue +19 -0
- package/src/components.d.ts +9 -0
- package/src/mixins/ContentMixin.js +44 -73
- package/src/stores/connectivities.js +59 -11
- package/src/stores/settings.js +15 -4
- package/vite.bundle-build.js +5 -2
- package/dist/Scaffold-DRQEE-j_.js +0 -43337
- package/dist/style-C6pIyWak.js +0 -104700
@@ -17,6 +17,7 @@
|
|
17
17
|
:helpModeDialog="useHelpModeDialog"
|
18
18
|
@annotation-open="onAnnotationOpen"
|
19
19
|
@annotation-close="onAnnotationClose"
|
20
|
+
@update-offline-annotation-enabled="updateOfflineAnnotationEnabled"
|
20
21
|
:annotationSidebar="annotationSidebar"
|
21
22
|
@help-mode-last-item="onHelpModeLastItem"
|
22
23
|
@shown-tooltip="onTooltipShown"
|
@@ -31,6 +32,8 @@
|
|
31
32
|
:markerCluster="true"
|
32
33
|
:markerLabels="markerLabels"
|
33
34
|
:flatmapAPI="flatmapAPI"
|
35
|
+
:showLocalSettings="showLocalSettings"
|
36
|
+
:showOpenMapButton="showOpenMapButton"
|
34
37
|
/>
|
35
38
|
|
36
39
|
<HelpModeDialog
|
@@ -139,6 +142,7 @@ export default {
|
|
139
142
|
if (this.entry.rotation) rotation = this.entry.rotation;
|
140
143
|
this.$refs.scaffold.toggleSyncControl(this.splitFlowStore.globalCallback, rotation);
|
141
144
|
if (this.splitFlowStore.syncMode) this.$refs.scaffold.fitWindow();
|
145
|
+
this.updateSettings();
|
142
146
|
}
|
143
147
|
EventBus.emit("mapLoaded", this.$refs.scaffold);
|
144
148
|
},
|
@@ -191,6 +195,15 @@ export default {
|
|
191
195
|
changeViewingMode: function (modeName) {
|
192
196
|
this.$refs.scaffold.changeViewingMode(modeName);
|
193
197
|
},
|
198
|
+
updateSettings: function () {
|
199
|
+
const {
|
200
|
+
backgroundDisplay,
|
201
|
+
viewingMode,
|
202
|
+
} = this.settingsStore.globalSettings;
|
203
|
+
|
204
|
+
this.$refs.scaffold.backgroundChangeCallback(backgroundDisplay);
|
205
|
+
this.$refs.scaffold.changeViewingMode(viewingMode);
|
206
|
+
},
|
194
207
|
},
|
195
208
|
computed: {
|
196
209
|
warningMessage: function() {
|
@@ -222,6 +235,12 @@ export default {
|
|
222
235
|
this.cardHoverHighlight();
|
223
236
|
}
|
224
237
|
});
|
238
|
+
EventBus.on('backgroundDisplayUpdate', (payload) => {
|
239
|
+
this.$refs.scaffold.backgroundChangeCallback(payload);
|
240
|
+
});
|
241
|
+
EventBus.on('viewingModeUpdate', (payload) => {
|
242
|
+
this.$refs.scaffold.changeViewingMode(payload);
|
243
|
+
});
|
225
244
|
},
|
226
245
|
};
|
227
246
|
</script>
|
package/src/components.d.ts
CHANGED
@@ -19,14 +19,23 @@ declare module 'vue' {
|
|
19
19
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
20
20
|
ElCol: typeof import('element-plus/es')['ElCol']
|
21
21
|
ElContainer: typeof import('element-plus/es')['ElContainer']
|
22
|
+
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
23
|
+
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
24
|
+
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
22
25
|
ElHeader: typeof import('element-plus/es')['ElHeader']
|
23
26
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
24
27
|
ElIconArrowDown: typeof import('@element-plus/icons-vue')['ArrowDown']
|
25
28
|
ElIconArrowUp: typeof import('@element-plus/icons-vue')['ArrowUp']
|
29
|
+
ElIconCompass: typeof import('@element-plus/icons-vue')['Compass']
|
30
|
+
ElIconEditPen: typeof import('@element-plus/icons-vue')['EditPen']
|
31
|
+
ElIconMoreFilled: typeof import('@element-plus/icons-vue')['MoreFilled']
|
32
|
+
ElIconShare: typeof import('@element-plus/icons-vue')['Share']
|
26
33
|
ElInput: typeof import('element-plus/es')['ElInput']
|
27
34
|
ElMain: typeof import('element-plus/es')['ElMain']
|
28
35
|
ElOption: typeof import('element-plus/es')['ElOption']
|
29
36
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
37
|
+
ElRadio: typeof import('element-plus/es')['ElRadio']
|
38
|
+
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
30
39
|
ElRow: typeof import('element-plus/es')['ElRow']
|
31
40
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
32
41
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
@@ -35,6 +35,7 @@ export default {
|
|
35
35
|
default: false,
|
36
36
|
},
|
37
37
|
},
|
38
|
+
inject: ['showGlobalSettings', 'showOpenMapButton'],
|
38
39
|
computed: {
|
39
40
|
...mapStores(useSettingsStore, useSplitFlowStore, useConnectivitiesStore),
|
40
41
|
idNamePair() {
|
@@ -52,16 +53,34 @@ export default {
|
|
52
53
|
annotationSidebar() {
|
53
54
|
return this.settingsStore.annotationSidebar;
|
54
55
|
},
|
56
|
+
// Hide local settings if global settings are shown
|
57
|
+
showLocalSettings() {
|
58
|
+
return !this.showGlobalSettings;
|
59
|
+
},
|
55
60
|
},
|
56
61
|
mounted: function () {
|
57
62
|
EventBus.on("startHelp", () => {
|
58
63
|
this.startHelp();
|
59
64
|
});
|
60
65
|
|
66
|
+
EventBus.on('connectivity-item-close', () => {
|
67
|
+
if (this.multiflatmapRef) {
|
68
|
+
const currentFlatmap = this.multiflatmapRef.getCurrentFlatmap();
|
69
|
+
if (currentFlatmap) {
|
70
|
+
currentFlatmap.closeTooltip();
|
71
|
+
}
|
72
|
+
}
|
73
|
+
if (this.flatmapRef) {
|
74
|
+
this.flatmapRef.closeTooltip();
|
75
|
+
}
|
76
|
+
});
|
77
|
+
|
61
78
|
this.multiflatmapRef = this.$refs.multiflatmap;
|
62
79
|
this.flatmapRef = this.$refs.flatmap;
|
63
80
|
this.scaffoldRef = this.$refs.scaffold;
|
64
81
|
this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities;
|
82
|
+
this.connectivityFilterOptions = this.connectivitiesStore.filterOptions;
|
83
|
+
this.connectivityFilterSources = this.connectivitiesStore.filterSources;
|
65
84
|
},
|
66
85
|
methods: {
|
67
86
|
toggleSyncMode: function () {
|
@@ -520,7 +539,10 @@ export default {
|
|
520
539
|
if ((this.multiflatmapRef || this.flatmapRef) && flatmap) {
|
521
540
|
this.flatmapHighlight(flatmap, hoverAnatomies, hoverDOI, hoverConnectivity).then((paths) => {
|
522
541
|
try {
|
523
|
-
flatmap.
|
542
|
+
flatmap.showConnectivityTooltips({
|
543
|
+
connectivityInfo: { featureId: paths },
|
544
|
+
data: []
|
545
|
+
});
|
524
546
|
} catch (error) {
|
525
547
|
console.log(error)
|
526
548
|
// only for connectivity hover highlight
|
@@ -550,6 +572,9 @@ export default {
|
|
550
572
|
onAnnotationClose: function () {
|
551
573
|
EventBus.emit('annotation-close');
|
552
574
|
},
|
575
|
+
updateOfflineAnnotationEnabled: function (payload) {
|
576
|
+
EventBus.emit('update-offline-annotation-enabled', payload);
|
577
|
+
},
|
553
578
|
onConnectivityInfoOpen: function (connectivityInfoData) {
|
554
579
|
EventBus.emit('connectivity-info-open', connectivityInfoData);
|
555
580
|
},
|
@@ -559,92 +584,38 @@ export default {
|
|
559
584
|
onConnectivityInfoClose: function () {
|
560
585
|
EventBus.emit('connectivity-info-close');
|
561
586
|
},
|
562
|
-
|
587
|
+
loadConnectivityExplorerConfig: async function (flatmap) {
|
588
|
+
const flatmapImp = flatmap.mapImp;
|
563
589
|
const sckanVersion = getKnowledgeSource(flatmapImp);
|
564
590
|
const flatmapQueries = markRaw(new FlatmapQueries());
|
565
591
|
flatmapQueries.initialise(this.flatmapAPI);
|
566
592
|
const knowledge = await loadAndStoreKnowledge(flatmapImp, flatmapQueries);
|
567
593
|
const uuid = flatmapImp.uuid;
|
594
|
+
const pathways = flatmapImp.pathways;
|
568
595
|
|
569
596
|
if (!this.connectivityKnowledge[sckanVersion]) {
|
570
597
|
this.connectivityKnowledge[sckanVersion] = knowledge
|
571
598
|
.filter((item) => {
|
572
|
-
return
|
573
|
-
item.source === sckanVersion &&
|
574
|
-
item.connectivity?.length
|
575
|
-
);
|
599
|
+
return item.source === sckanVersion && item.connectivity?.length;
|
576
600
|
})
|
577
601
|
.sort((a, b) => a.label.localeCompare(b.label));
|
578
602
|
}
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
this.connectivityKnowledge[uuid] = knowledge
|
585
|
-
.filter((item) => {
|
586
|
-
return (
|
587
|
-
item.source === sckanVersion &&
|
588
|
-
item.connectivity?.length &&
|
589
|
-
item.id in pathsFromMap
|
590
|
-
);
|
591
|
-
})
|
592
|
-
.sort((a, b) => a.label.localeCompare(b.label));
|
603
|
+
if (!this.connectivityKnowledge[uuid]) {
|
604
|
+
const pathsFromMap = pathways ? pathways.paths : {};
|
605
|
+
this.connectivityKnowledge[uuid] = this.connectivityKnowledge[sckanVersion]
|
606
|
+
.filter((item) => item.id in pathsFromMap);
|
593
607
|
}
|
594
|
-
|
595
608
|
this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge);
|
596
|
-
|
597
|
-
|
609
|
+
if (!this.connectivityFilterOptions[uuid]) {
|
610
|
+
this.connectivityFilterOptions[uuid] = await flatmap.getFilterOptions();
|
611
|
+
}
|
612
|
+
this.connectivitiesStore.updateFilterOptions(this.connectivityFilterOptions);
|
613
|
+
if (!this.connectivityFilterSources[uuid]) {
|
614
|
+
this.connectivityFilterSources[uuid] = flatmap.getFilterSources();
|
615
|
+
}
|
616
|
+
this.connectivitiesStore.updateFilterSources(this.connectivityFilterSources);
|
598
617
|
EventBus.emit('species-layout-connectivity-update');
|
599
618
|
},
|
600
|
-
getSearchedId: function (flatmap, term) {
|
601
|
-
let ids = [];
|
602
|
-
const searchResult = flatmap.mapImp.search(term);
|
603
|
-
const featureIds = searchResult.__featureIds || searchResult.featureIds;
|
604
|
-
featureIds.forEach((id) => {
|
605
|
-
const annotation = flatmap.mapImp.annotation(id);
|
606
|
-
if (
|
607
|
-
annotation.label?.toLowerCase().includes(term.toLowerCase()) &&
|
608
|
-
annotation.models && !ids.includes(annotation.models)
|
609
|
-
) {
|
610
|
-
ids.push(annotation.models);
|
611
|
-
}
|
612
|
-
});
|
613
|
-
return ids;
|
614
|
-
},
|
615
|
-
connectivityQueryFilter: async function (flatmap, data) {
|
616
|
-
const uniqueConnectivities = this.connectivitiesStore.getUniqueConnectivitiesByKeys;
|
617
|
-
// only for those flatmaps that are shown on the split screen
|
618
|
-
if (flatmap.$el.checkVisibility()) {
|
619
|
-
let payload = {
|
620
|
-
state: "default",
|
621
|
-
data: [...uniqueConnectivities],
|
622
|
-
};
|
623
|
-
if (data) {
|
624
|
-
if (data.type === "query-update") {
|
625
|
-
if (this.query !== data.value) this.target = [];
|
626
|
-
this.query = data.value;
|
627
|
-
} else if (data.type === "filter-update") {
|
628
|
-
this.filter = data.value;
|
629
|
-
}
|
630
|
-
}
|
631
|
-
if (this.query) {
|
632
|
-
payload.state = "processed";
|
633
|
-
let prom1 = [], options = {};
|
634
|
-
const searchTerms = this.query.split(",").map((term) => term.trim());
|
635
|
-
for (let index = 0; index < searchTerms.length; index++) {
|
636
|
-
prom1.push(this.getSearchedId(flatmap, searchTerms[index]));
|
637
|
-
}
|
638
|
-
const nestedIds = await Promise.all(prom1);
|
639
|
-
const ids = [...new Set(nestedIds.flat())];
|
640
|
-
let paths = await flatmap.retrieveConnectedPaths(ids, options);
|
641
|
-
paths = [...ids, ...paths.filter((path) => !ids.includes(path))];
|
642
|
-
let results = uniqueConnectivities.filter((item) => paths.includes(item.id));
|
643
|
-
payload.data = results;
|
644
|
-
}
|
645
|
-
EventBus.emit("connectivity-knowledge", payload);
|
646
|
-
}
|
647
|
-
}
|
648
619
|
},
|
649
620
|
data: function () {
|
650
621
|
return {
|
@@ -666,8 +637,8 @@ export default {
|
|
666
637
|
isInHelp: false,
|
667
638
|
mapManager: undefined,
|
668
639
|
connectivityKnowledge: {},
|
669
|
-
|
670
|
-
|
640
|
+
connectivityFilterOptions: {},
|
641
|
+
connectivityFilterSources: {},
|
671
642
|
highlightDelay: undefined
|
672
643
|
};
|
673
644
|
},
|
@@ -3,33 +3,81 @@ import { defineStore } from 'pinia';
|
|
3
3
|
export const useConnectivitiesStore = defineStore('connectivities', {
|
4
4
|
state: () => {
|
5
5
|
return {
|
6
|
-
globalConnectivities: {},
|
7
6
|
activeConnectivityKeys: [],
|
8
|
-
|
7
|
+
globalConnectivities: {},
|
8
|
+
filterOptions: {},
|
9
|
+
filterSources: {},
|
10
|
+
};
|
9
11
|
},
|
10
12
|
getters: {
|
11
13
|
getUniqueConnectivitiesByKeys: (state) => {
|
12
14
|
let combinedConnectivities = [];
|
13
15
|
state.activeConnectivityKeys.forEach((uuid) => {
|
14
|
-
if (uuid in state
|
15
|
-
const
|
16
|
-
combinedConnectivities.push(...
|
16
|
+
if (uuid in state['globalConnectivities']) {
|
17
|
+
const connectivities = state['globalConnectivities'][uuid];
|
18
|
+
combinedConnectivities.push(...connectivities);
|
17
19
|
}
|
18
20
|
});
|
19
|
-
|
20
21
|
const uniqueConnectivities = Array.from(
|
21
|
-
new Map(combinedConnectivities.map((item) => [item
|
22
|
+
new Map(combinedConnectivities.map((item) => [item['id'], item])).values()
|
22
23
|
);
|
23
|
-
|
24
24
|
return uniqueConnectivities;
|
25
25
|
},
|
26
|
+
getUniqueFilterOptionsByKeys: (state) => {
|
27
|
+
const uniqueFilterOptions = state.activeConnectivityKeys.reduce((acc, uuid) => {
|
28
|
+
const filters = state.filterOptions[uuid];
|
29
|
+
if (!filters) return acc;
|
30
|
+
|
31
|
+
for (const filter of filters) {
|
32
|
+
const existing = acc[filter.key];
|
33
|
+
|
34
|
+
if (!existing) {
|
35
|
+
acc[filter.key] = { ...filter };
|
36
|
+
} else {
|
37
|
+
const mergedChildren = [...existing.children, ...filter.children];
|
38
|
+
const uniqueChildren = Array.from(
|
39
|
+
new Map(mergedChildren.map(child => [child.key, child])).values()
|
40
|
+
);
|
41
|
+
existing.children = uniqueChildren;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
return acc;
|
46
|
+
}, {});
|
47
|
+
return Object.values(uniqueFilterOptions);
|
48
|
+
},
|
49
|
+
getUniqueFilterSourcesByKeys: (state) => {
|
50
|
+
const uniqueFilterSources = state.activeConnectivityKeys.reduce((acc, uuid) => {
|
51
|
+
const filters = state.filterSources[uuid];
|
52
|
+
if (!filters) return acc;
|
53
|
+
|
54
|
+
for (const [filter, options] of Object.entries(filters)) {
|
55
|
+
if (!acc[filter]) acc[filter] = {};
|
56
|
+
|
57
|
+
for (const [option, ids] of Object.entries(options)) {
|
58
|
+
acc[filter][option] = acc[filter][option]
|
59
|
+
? Array.from(new Set([...acc[filter][option], ...ids]))
|
60
|
+
: [...ids];
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
return acc;
|
65
|
+
}, {});
|
66
|
+
return uniqueFilterSources;
|
67
|
+
},
|
26
68
|
},
|
27
69
|
actions: {
|
70
|
+
updateActiveConnectivityKeys(activeConnectivityKeys) {
|
71
|
+
this.activeConnectivityKeys = activeConnectivityKeys;
|
72
|
+
},
|
28
73
|
updateGlobalConnectivities(globalConnectivities) {
|
29
74
|
this.globalConnectivities = globalConnectivities;
|
30
75
|
},
|
31
|
-
|
32
|
-
this.
|
76
|
+
updateFilterOptions(filterOptions) {
|
77
|
+
this.filterOptions = filterOptions;
|
33
78
|
},
|
34
|
-
|
79
|
+
updateFilterSources(filterSources) {
|
80
|
+
this.filterSources = filterSources;
|
81
|
+
},
|
82
|
+
},
|
35
83
|
});
|
package/src/stores/settings.js
CHANGED
@@ -32,11 +32,17 @@ export const useSettingsStore = defineStore('settings', {
|
|
32
32
|
connectivityInfoSidebar: true,
|
33
33
|
annotationSidebar: true,
|
34
34
|
allClosable: true,
|
35
|
+
offlineAnnotationEnabled: false,
|
35
36
|
globalSettings: {
|
36
|
-
displayMarkers: true,
|
37
|
-
highlightConnectedPaths: false,
|
38
|
-
highlightDOIPaths: false, // comment out to hide in settings
|
39
|
-
interactiveMode: 'dataset', // dataset, connectivity, multiscale
|
37
|
+
displayMarkers: true, // comment out to hide in settings
|
38
|
+
// highlightConnectedPaths: false, // comment out to hide in settings
|
39
|
+
// highlightDOIPaths: false, // comment out to hide in settings
|
40
|
+
interactiveMode: 'dataset', // dataset, connectivity, multiscale // comment out to hide in settings
|
41
|
+
viewingMode: 'Exploration',
|
42
|
+
flightPathDisplay: false,
|
43
|
+
organsDisplay: true,
|
44
|
+
outlinesDisplay: true,
|
45
|
+
backgroundDisplay: 'white',
|
40
46
|
},
|
41
47
|
}
|
42
48
|
},
|
@@ -186,10 +192,15 @@ export const useSettingsStore = defineStore('settings', {
|
|
186
192
|
updateAllClosable(allClosable) {
|
187
193
|
this.allClosable = allClosable;
|
188
194
|
},
|
195
|
+
updateOfflineAnnotationEnabled(offlineAnnotationEnabled) {
|
196
|
+
this.offlineAnnotationEnabled = offlineAnnotationEnabled;
|
197
|
+
},
|
189
198
|
updateGlobalSettings(globalSettings) {
|
190
199
|
for (const [key, value] of Object.entries(globalSettings)) {
|
191
200
|
this.globalSettings[key] = value;
|
192
201
|
}
|
202
|
+
// add global settins to storage
|
203
|
+
localStorage.setItem('mapviewer.globalSettings', JSON.stringify(this.globalSettings));
|
193
204
|
},
|
194
205
|
}
|
195
206
|
});
|
package/vite.bundle-build.js
CHANGED
@@ -12,13 +12,16 @@ export default defineConfig((configEnv) => {
|
|
12
12
|
fileName: "mapintegratedvuer",
|
13
13
|
},
|
14
14
|
rollupOptions: {
|
15
|
-
external: ["vue", "pinia", "@abi-software/
|
15
|
+
external: ["vue", "pinia", "@abi-software/flatmapvuer", "@abi-software/plotvuer",
|
16
|
+
"@abi-software/scaffoldvuer", "@abi-software/simulationvuer"],
|
16
17
|
output: {
|
17
18
|
globals: {
|
18
19
|
vue: "Vue",
|
19
20
|
pinia: "pinia",
|
20
|
-
"@abi-software/
|
21
|
+
"@abi-software/flatmapvuer": "flatmapvuer",
|
21
22
|
"@abi-software/plotvuer": "plotvuer",
|
23
|
+
"@abi-software/scaffoldvuer": "scaffoldvuer",
|
24
|
+
"@abi-software/simulationvuer": "simulationvuer",
|
22
25
|
},
|
23
26
|
},
|
24
27
|
},
|