@abi-software/mapintegratedvuer 1.9.0-beta.0 → 1.9.0-beta.2
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-DhYKJqtq.js +715 -0
- package/dist/{Flatmap-B1OnfjfL.js → Flatmap-CCNdXCt7.js} +59 -61
- package/dist/{Iframe-BDDbPJx2.js → Iframe-DRy2XYXB.js} +2 -2
- package/dist/{MultiFlatmap-ekGs1Vqx.js → MultiFlatmap-C5wAg0Tx.js} +44 -35
- package/dist/{Plot-ByUL7Ip1.js → Plot-D4qtJ6vo.js} +2 -2
- package/dist/{Scaffold-hK8KW9Yh.js → Scaffold-BXhAyVhd.js} +29 -23
- package/dist/{Simulation-VDQUIpAa.js → Simulation-nAqMBk7o.js} +2 -2
- package/dist/{index-BGZgzrzo.js → index-z8CoyNjc.js} +29178 -22575
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +1654 -1003
- package/dist/{style-Dd26IITM.js → style-DwAEhcnj.js} +70581 -67618
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/src/App.vue +9 -28
- package/src/assets/header-icon.scss +7 -0
- package/src/components/ContentBar.vue +4 -2
- package/src/components/DialogToolbarContent.vue +87 -14
- package/src/components/MapContent.vue +20 -23
- package/src/components/SplitFlow.vue +151 -114
- package/src/components/viewers/Flatmap.vue +3 -4
- package/src/components/viewers/MultiFlatmap.vue +26 -8
- package/src/components/viewers/Scaffold.vue +2 -2
- package/src/mixins/ContentMixin.js +139 -76
- package/src/mixins/DynamicMarkerMixin.js +1 -1
- package/src/stores/settings.js +11 -9
- package/src/stores/splitFlow.js +6 -9
- package/dist/ContentMixin-Ccjd33IX.js +0 -358
- package/src/components/markerZoomLevelsHardCoded.js +0 -250
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "1.9.0-beta.
|
3
|
+
"version": "1.9.0-beta.2",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vite --host --force",
|
@@ -50,11 +50,11 @@
|
|
50
50
|
"*.js"
|
51
51
|
],
|
52
52
|
"dependencies": {
|
53
|
-
"@abi-software/flatmapvuer": "^1.9.0-beta.
|
54
|
-
"@abi-software/map-side-bar": "^2.7.3-beta.
|
55
|
-
"@abi-software/map-utilities": "^1.5.0-beta.
|
53
|
+
"@abi-software/flatmapvuer": "^1.9.0-beta.2",
|
54
|
+
"@abi-software/map-side-bar": "^2.7.3-beta.3",
|
55
|
+
"@abi-software/map-utilities": "^1.5.0-beta.2",
|
56
56
|
"@abi-software/plotvuer": "^1.0.3",
|
57
|
-
"@abi-software/scaffoldvuer": "^1.9.0-beta.
|
57
|
+
"@abi-software/scaffoldvuer": "^1.9.0-beta.1",
|
58
58
|
"@abi-software/simulationvuer": "1.0.1",
|
59
59
|
"@abi-software/sparc-annotation": "0.3.2",
|
60
60
|
"@abi-software/svg-sprite": "^1.0.1",
|
package/src/App.vue
CHANGED
@@ -23,8 +23,6 @@
|
|
23
23
|
<el-button @click="setWholebody()" size="small">Set to Wholebody</el-button>
|
24
24
|
<el-button @click="setFlatmap()" size="small">Set Flatmap</el-button>
|
25
25
|
<el-button @click="setSearch()" size="small">Set Search</el-button>
|
26
|
-
<el-button @click="toggleHighlightConnectedPaths()" size="small">Toggle Highlight Connected Paths</el-button>
|
27
|
-
<el-button @click="toggleHighlightDOIPaths()" size="small">Toggle Highlight DOI Paths</el-button>
|
28
26
|
</div>
|
29
27
|
</div>
|
30
28
|
<template #reference>
|
@@ -43,7 +41,7 @@
|
|
43
41
|
:shareLink="shareLink"
|
44
42
|
:useHelpModeDialog="true"
|
45
43
|
:connectivityInfoSidebar="true"
|
46
|
-
:
|
44
|
+
:allClosable="false"
|
47
45
|
@updateShareLinkRequested="updateUUID"
|
48
46
|
@isReady="viewerIsReady"
|
49
47
|
@mapLoaded="mapIsLoaded"
|
@@ -67,10 +65,9 @@ import {
|
|
67
65
|
|
68
66
|
const getAnnotationId = (api, withAnnotation) => {
|
69
67
|
return new Promise((resolve) => {
|
70
|
-
let
|
71
|
-
|
72
|
-
|
73
|
-
let maxRetry = 3
|
68
|
+
let anonymousAnnotations = JSON.parse(sessionStorage.getItem('anonymous-annotation')) || undefined;
|
69
|
+
if (withAnnotation && anonymousAnnotations) {
|
70
|
+
let maxRetry = 3;
|
74
71
|
const annotationUrl = api + '/annotation/getshareid';
|
75
72
|
const getId = (attempt) => {
|
76
73
|
fetch(annotationUrl, {
|
@@ -78,7 +75,7 @@ const getAnnotationId = (api, withAnnotation) => {
|
|
78
75
|
headers: {
|
79
76
|
'Content-type': 'application/json',
|
80
77
|
},
|
81
|
-
body: JSON.stringify({ state:
|
78
|
+
body: JSON.stringify({ state: anonymousAnnotations }),
|
82
79
|
}).then((response) => {
|
83
80
|
if (response.ok) {
|
84
81
|
return response.json();
|
@@ -89,7 +86,6 @@ const getAnnotationId = (api, withAnnotation) => {
|
|
89
86
|
resolve(data.uuid);
|
90
87
|
})
|
91
88
|
.catch((error) => {
|
92
|
-
console.log(`Unable to create permalink: attempt ${attempt} of ${maxRetry}`)
|
93
89
|
if (maxRetry > attempt) {
|
94
90
|
getId(attempt + 1);
|
95
91
|
} else {
|
@@ -106,7 +102,7 @@ const getAnnotationId = (api, withAnnotation) => {
|
|
106
102
|
|
107
103
|
const getAnnotationState = (api, annotationId) => {
|
108
104
|
return new Promise((resolve) => {
|
109
|
-
let maxRetry = 3
|
105
|
+
let maxRetry = 3;
|
110
106
|
const annotationUrl = api + '/annotation/getstate';
|
111
107
|
const getState = (attempt) => {
|
112
108
|
fetch(annotationUrl, {
|
@@ -117,16 +113,15 @@ const getAnnotationState = (api, annotationId) => {
|
|
117
113
|
body: JSON.stringify({ uuid: annotationId }),
|
118
114
|
}).then((response) => {
|
119
115
|
if (response.ok) {
|
120
|
-
return response.json()
|
116
|
+
return response.json();
|
121
117
|
}
|
122
|
-
throw new Error('Unsuccessful attempt to get annotations')
|
118
|
+
throw new Error('Unsuccessful attempt to get annotations');
|
123
119
|
})
|
124
120
|
.then((data) => {
|
125
121
|
resolve(data);
|
126
122
|
})
|
127
123
|
.catch((error) => {
|
128
|
-
console.log(
|
129
|
-
console.log(`Unable to get annotation state: attempt ${attempt} of ${maxRetry}`)
|
124
|
+
console.log(`Unable to get annotation state: attempt ${attempt} of ${maxRetry}`);
|
130
125
|
if (maxRetry > attempt) {
|
131
126
|
getState(attempt + 1);
|
132
127
|
} else {
|
@@ -156,10 +151,6 @@ export default {
|
|
156
151
|
mapSettings: [],
|
157
152
|
startingMap: "AC",
|
158
153
|
ElIconSetting: shallowRef(ElIconSetting),
|
159
|
-
hoverHighlightOptions: {
|
160
|
-
highlightConnectedPaths: true,
|
161
|
-
highlightDOIPaths: false,
|
162
|
-
},
|
163
154
|
}
|
164
155
|
},
|
165
156
|
computed: {
|
@@ -225,7 +216,6 @@ export default {
|
|
225
216
|
if (annotationId) {
|
226
217
|
state.annotationId = annotationId;
|
227
218
|
}
|
228
|
-
console.log(state)
|
229
219
|
getShareLink(1)
|
230
220
|
});
|
231
221
|
|
@@ -281,12 +271,6 @@ export default {
|
|
281
271
|
setSearch: function() {
|
282
272
|
this.$refs.map.openSearch([], "10.26275/1uno-tynt");
|
283
273
|
},
|
284
|
-
toggleHighlightConnectedPaths: function () {
|
285
|
-
this.hoverHighlightOptions.highlightConnectedPaths = !this.hoverHighlightOptions.highlightConnectedPaths;
|
286
|
-
},
|
287
|
-
toggleHighlightDOIPaths: function () {
|
288
|
-
this.hoverHighlightOptions.highlightDOIPaths = !this.hoverHighlightOptions.highlightDOIPaths;
|
289
|
-
},
|
290
274
|
mapIsLoaded: function(map) {
|
291
275
|
console.log("map is loaded", map)
|
292
276
|
// map.changeViewingMode('Annotation')
|
@@ -313,7 +297,6 @@ export default {
|
|
313
297
|
if (state?.state?.annotationId) {
|
314
298
|
getAnnotationState(this.api, state.state.annotationId).
|
315
299
|
then((data) => {
|
316
|
-
console.log(data)
|
317
300
|
if (data) {
|
318
301
|
sessionStorage.setItem('anonymous-annotation', JSON.stringify(data.state))
|
319
302
|
}
|
@@ -322,8 +305,6 @@ export default {
|
|
322
305
|
} else {
|
323
306
|
this.state = state.state;
|
324
307
|
}
|
325
|
-
|
326
|
-
console.log(state)
|
327
308
|
}
|
328
309
|
}
|
329
310
|
xmlhttp.send(JSON.stringify({"uuid": this.uuid}));
|
@@ -65,7 +65,7 @@
|
|
65
65
|
:teleported=false trigger="hover" popper-class="header-popper" >
|
66
66
|
<template #reference>
|
67
67
|
<map-svg-icon icon="close" class="header-icon"
|
68
|
-
v-show="(activeView !== 'singlepanel') && (entry.mode !== 'main')"
|
68
|
+
v-show="(activeView !== 'singlepanel') && ((entry.mode !== 'main') || allClosable )"
|
69
69
|
@click="closeAndRemove()"/>
|
70
70
|
</template>
|
71
71
|
</el-popover>
|
@@ -131,6 +131,9 @@ export default {
|
|
131
131
|
},
|
132
132
|
computed: {
|
133
133
|
...mapStores(useEntriesStore, useSettingsStore, useSplitFlowStore),
|
134
|
+
allClosable() {
|
135
|
+
return this.settingsStore.allClosable;
|
136
|
+
},
|
134
137
|
helpDelay() {
|
135
138
|
return this.settingsStore.helpDelay;
|
136
139
|
},
|
@@ -240,7 +243,6 @@ export default {
|
|
240
243
|
target: value
|
241
244
|
});
|
242
245
|
this.$nextTick(() => {
|
243
|
-
EventBus.emit('connectivity-info-close');
|
244
246
|
setTimeout(() => {
|
245
247
|
this.$emit("chooser-changed");
|
246
248
|
}, 1200);
|
@@ -209,6 +209,62 @@
|
|
209
209
|
<map-svg-icon icon="close" class="header-icon" @click="close" v-show="showIcons"/>
|
210
210
|
</template>
|
211
211
|
</el-popover>
|
212
|
+
<!--
|
213
|
+
<el-popover
|
214
|
+
v-if="globalSettingRef"
|
215
|
+
:virtual-ref="globalSettingRef"
|
216
|
+
ref="settingPopover"
|
217
|
+
placement="bottom"
|
218
|
+
width="133"
|
219
|
+
:teleported=false
|
220
|
+
trigger="click"
|
221
|
+
popper-class="setting-popover"
|
222
|
+
virtual-triggering
|
223
|
+
>
|
224
|
+
<el-row :gutter="20">
|
225
|
+
<el-col :span="20">
|
226
|
+
<el-checkbox
|
227
|
+
v-model="globalSettings.displayMarkers"
|
228
|
+
@change="updateGlobalSettings"
|
229
|
+
>
|
230
|
+
Display Map Markers
|
231
|
+
</el-checkbox>
|
232
|
+
<p>Card Hover</p>
|
233
|
+
<el-checkbox
|
234
|
+
v-model="globalSettings.highlightConnectedPaths"
|
235
|
+
@change="updateGlobalSettings"
|
236
|
+
>
|
237
|
+
Highlight Connected Paths
|
238
|
+
</el-checkbox>
|
239
|
+
<el-checkbox
|
240
|
+
v-model="globalSettings.highlightDOIPaths"
|
241
|
+
@change="updateGlobalSettings"
|
242
|
+
>
|
243
|
+
Highlight DOI Paths
|
244
|
+
</el-checkbox>
|
245
|
+
<p>Interactive Mode</p>
|
246
|
+
<el-radio-group
|
247
|
+
v-model="globalSettings.interactiveMode"
|
248
|
+
@change="updateGlobalSettings"
|
249
|
+
>
|
250
|
+
<el-radio value="dataset">Dataset Exploration</el-radio>
|
251
|
+
<el-radio value="connectivity">Connectivity Exploration</el-radio>
|
252
|
+
<el-radio value="multiscale">Multiscale Model</el-radio>
|
253
|
+
</el-radio-group>
|
254
|
+
</el-col>
|
255
|
+
</el-row>
|
256
|
+
</el-popover>
|
257
|
+
<el-popover class="tooltip" content="Global Settings" placement="bottom-end"
|
258
|
+
:show-after="helpDelay" :teleported=false trigger="hover"
|
259
|
+
popper-class="header-popper"
|
260
|
+
>
|
261
|
+
<template #reference>
|
262
|
+
<el-icon class="header-icon" ref="globalSettingRef">
|
263
|
+
<el-icon-more-filled />
|
264
|
+
</el-icon>
|
265
|
+
</template>
|
266
|
+
</el-popover>
|
267
|
+
-->
|
212
268
|
</el-row>
|
213
269
|
</div>
|
214
270
|
</template>
|
@@ -226,6 +282,7 @@ import { MapSvgIcon, MapSvgSpriteColor } from '@abi-software/svg-sprite';
|
|
226
282
|
import SearchControls from './SearchControls.vue';
|
227
283
|
import {
|
228
284
|
CopyDocument as ElIconCopyDocument,
|
285
|
+
MoreFilled as ElIconMoreFilled,
|
229
286
|
} from '@element-plus/icons-vue';
|
230
287
|
import {
|
231
288
|
ElButton as Button,
|
@@ -233,6 +290,8 @@ import {
|
|
233
290
|
ElIcon as Icon,
|
234
291
|
ElInput as Input,
|
235
292
|
ElPopover as Popover,
|
293
|
+
ElRadio as Radio,
|
294
|
+
ElRadioGroup as RadioGroup,
|
236
295
|
ElRow as Row,
|
237
296
|
ElSwitch as Switch,
|
238
297
|
} from "element-plus";
|
@@ -248,6 +307,8 @@ export default {
|
|
248
307
|
Icon,
|
249
308
|
Input,
|
250
309
|
Popover,
|
310
|
+
Radio,
|
311
|
+
RadioGroup,
|
251
312
|
Row,
|
252
313
|
Switch,
|
253
314
|
MapSvgIcon,
|
@@ -306,7 +367,7 @@ export default {
|
|
306
367
|
let flag = !(value === true);
|
307
368
|
if (flag !== this.independent)
|
308
369
|
this.independent = flag;
|
309
|
-
}
|
370
|
+
},
|
310
371
|
},
|
311
372
|
data: function() {
|
312
373
|
return {
|
@@ -317,23 +378,32 @@ export default {
|
|
317
378
|
failedSearch: undefined,
|
318
379
|
activeViewRef: undefined,
|
319
380
|
permalinkRef: undefined,
|
381
|
+
globalSettingRef: undefined,
|
320
382
|
ElIconCopyDocument: shallowRef(ElIconCopyDocument),
|
383
|
+
globalSettings: {},
|
321
384
|
}
|
322
385
|
},
|
323
386
|
methods: {
|
324
|
-
|
325
|
-
this.
|
387
|
+
loadGlobalSettings: function () {
|
388
|
+
this.globalSettings = {
|
389
|
+
...this.globalSettings,
|
390
|
+
...this.settingsStore.globalSettings
|
391
|
+
};
|
326
392
|
},
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
393
|
+
/**
|
394
|
+
updateGlobalSettings: function() {
|
395
|
+
const updatedSettings = this.settingsStore.getUpdatedGlobalSettingsKey(this.globalSettings);
|
396
|
+
this.settingsStore.updateGlobalSettings(this.globalSettings);
|
397
|
+
|
398
|
+
// display marker update
|
399
|
+
if (updatedSettings.includes('displayMarkers')) {
|
400
|
+
EventBus.emit('markerUpdate');
|
401
|
+
}
|
402
|
+
if (updatedSettings.includes('interactiveMode')) {
|
403
|
+
EventBus.emit('modeUpdate', this.globalSettings.interactiveMode);
|
335
404
|
}
|
336
405
|
},
|
406
|
+
*/
|
337
407
|
titleClicked: function(id) {
|
338
408
|
this.$emit("titleClicked", id);
|
339
409
|
},
|
@@ -387,8 +457,11 @@ export default {
|
|
387
457
|
mounted: function () {
|
388
458
|
this.activeViewRef = shallowRef(this.$refs.activeViewRef);
|
389
459
|
this.permalinkRef = shallowRef(this.$refs.permalinkRef);
|
460
|
+
this.globalSettingRef = shallowRef(this.$refs.globalSettingRef);
|
390
461
|
|
391
462
|
document.addEventListener('fullscreenchange', this.onFullscreenEsc);
|
463
|
+
|
464
|
+
this.loadGlobalSettings();
|
392
465
|
},
|
393
466
|
unmounted: function () {
|
394
467
|
document.removeEventListener('fullscreenchange', this.onFullscreenEsc);
|
@@ -515,7 +588,8 @@ export default {
|
|
515
588
|
padding-top:7px;
|
516
589
|
}
|
517
590
|
|
518
|
-
:deep(.view-icon-popover.el-popper)
|
591
|
+
:deep(.view-icon-popover.el-popper),
|
592
|
+
:deep(.setting-popover.el-popper ) {
|
519
593
|
border: 1px solid $app-primary-color;
|
520
594
|
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
|
521
595
|
padding: 4px 8px 12px 8px;
|
@@ -563,5 +637,4 @@ export default {
|
|
563
637
|
top: 0px;
|
564
638
|
scale: 0.7;
|
565
639
|
}
|
566
|
-
|
567
|
-
</style>
|
640
|
+
</style>
|
@@ -100,15 +100,12 @@ export default {
|
|
100
100
|
default: true,
|
101
101
|
},
|
102
102
|
/**
|
103
|
-
*
|
104
|
-
* when
|
103
|
+
* All panes including primary default viewer will be closable
|
104
|
+
* when this is set to true.
|
105
105
|
*/
|
106
|
-
|
107
|
-
type:
|
108
|
-
default:
|
109
|
-
highlightConnectedPaths: false,
|
110
|
-
highlightDOIPaths: false,
|
111
|
-
}),
|
106
|
+
allClosable: {
|
107
|
+
type: Boolean,
|
108
|
+
default: true,
|
112
109
|
},
|
113
110
|
},
|
114
111
|
data: function () {
|
@@ -210,12 +207,12 @@ export default {
|
|
210
207
|
* @public
|
211
208
|
* Get the current state of the map viewer, these states can be used to
|
212
209
|
* restore settings and viewers using the setState method.
|
213
|
-
* Set
|
214
|
-
* state of
|
215
|
-
* @arg `
|
210
|
+
* Set anonymousAnnotations to true if the user would like to perserve the
|
211
|
+
* state of anonymous annotations.
|
212
|
+
* @arg `anonymousAnnotations`
|
216
213
|
*/
|
217
|
-
getState: function(
|
218
|
-
return this.$refs.flow.getState(
|
214
|
+
getState: function(anonymousAnnotations = false){
|
215
|
+
return this.$refs.flow.getState(anonymousAnnotations);
|
219
216
|
},
|
220
217
|
/**
|
221
218
|
* @public
|
@@ -270,7 +267,7 @@ export default {
|
|
270
267
|
// biologicalSex - biological sex to be displayed (PATO)
|
271
268
|
// organ - Target organ, flatmap will conduct a local search
|
272
269
|
// using this
|
273
|
-
|
270
|
+
|
274
271
|
//Look for the key in the available species array,
|
275
272
|
//it will use the taxo and biologicalSex as hints.
|
276
273
|
const key = findSpeciesKey(state);
|
@@ -360,15 +357,16 @@ export default {
|
|
360
357
|
beforeMount: function() {
|
361
358
|
if (this.options) {
|
362
359
|
// Split options prop up to commit to the store
|
363
|
-
this.options.sparcApi ? this.settingsStore.updateSparcAPI(this.options.sparcApi) : null
|
364
|
-
this.options.algoliaIndex ? this.settingsStore.updateAlgoliaIndex(this.options.algoliaIndex) : null
|
365
|
-
this.options.algoliaKey ? this.settingsStore.updateAlgoliaKey(this.options.algoliaKey) : null
|
366
|
-
this.options.algoliaId ? this.settingsStore.updateAlgoliaId(this.options.algoliaId) : null
|
367
|
-
this.options.pennsieveApi ? this.settingsStore.updatePennsieveApi(this.options.pennsieveApi) : null
|
368
|
-
this.options.flatmapAPI ? this.settingsStore.updateFlatmapAPI(this.options.flatmapAPI) : null
|
369
|
-
this.options.nlLinkPrefix ? this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix) : null
|
370
|
-
this.options.rootUrl ? this.settingsStore.updateRootUrl(this.options.rootUrl) : null
|
360
|
+
this.options.sparcApi ? this.settingsStore.updateSparcAPI(this.options.sparcApi) : null;
|
361
|
+
this.options.algoliaIndex ? this.settingsStore.updateAlgoliaIndex(this.options.algoliaIndex) : null;
|
362
|
+
this.options.algoliaKey ? this.settingsStore.updateAlgoliaKey(this.options.algoliaKey) : null;
|
363
|
+
this.options.algoliaId ? this.settingsStore.updateAlgoliaId(this.options.algoliaId) : null;
|
364
|
+
this.options.pennsieveApi ? this.settingsStore.updatePennsieveApi(this.options.pennsieveApi) : null;
|
365
|
+
this.options.flatmapAPI ? this.settingsStore.updateFlatmapAPI(this.options.flatmapAPI) : null;
|
366
|
+
this.options.nlLinkPrefix ? this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix) : null;
|
367
|
+
this.options.rootUrl ? this.settingsStore.updateRootUrl(this.options.rootUrl) : null;
|
371
368
|
}
|
369
|
+
this.settingsStore.updateAllClosable(this.allClosable);
|
372
370
|
this.splitFlowStore?.reset();
|
373
371
|
this.splitFlowStore?.getAvailableTerms(this.settingsStore.sparcApi);
|
374
372
|
},
|
@@ -398,7 +396,6 @@ export default {
|
|
398
396
|
this.settingsStore.updateUseHelpModeDialog(this.useHelpModeDialog);
|
399
397
|
this.settingsStore.updateConnectivityInfoSidebar(this.connectivityInfoSidebar);
|
400
398
|
this.settingsStore.updateAnnotationSidebar(this.annotationSidebar);
|
401
|
-
this.settingsStore.updateHoverHighlightOptions(this.hoverHighlightOptions);
|
402
399
|
}
|
403
400
|
}
|
404
401
|
|