@abi-software/mapintegratedvuer 1.1.0-beta.5 → 1.1.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/README.md +15 -2
- package/dist/{ContentMixin-C35Jowvp.js → ContentMixin-Belbk7R9.js} +97 -61
- package/dist/Flatmap-BEStr9DR.js +146 -0
- package/dist/{Iframe-fcNscihB.js → Iframe-CNeqS04g.js} +2 -2
- package/dist/{MultiFlatmap-BIT2tVyE.js → MultiFlatmap-CFF8nyw2.js} +81 -64
- package/dist/{Plot-B9xsWP2v.js → Plot-BpS4tvSe.js} +2 -2
- package/dist/{Scaffold-DYoxAJI0.js → Scaffold-BXY9_HO6.js} +10925 -10528
- package/dist/{Simulation-s1KOrb80.js → Simulation-Di2xaBxJ.js} +2 -2
- package/dist/{flatmapvuer-BM5z_95w.js → flatmapvuer-C67b_5lI.js} +11707 -11453
- package/dist/{index-DIFC-Q9x.js → index-CpppckRD.js} +4349 -4325
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +479 -479
- package/dist/style-CdEDV2B6.js +62 -0
- package/dist/style.css +1 -1
- package/package.json +7 -4
- package/src/App.vue +10 -1
- package/src/components/FlatmapContextCard.vue +22 -10
- package/src/components/MapContent.vue +20 -2
- package/src/components/SplitDialog.vue +4 -4
- package/src/components/SplitFlow.vue +6 -9
- package/src/components/viewers/Flatmap.vue +23 -5
- package/src/components/viewers/MultiFlatmap.vue +31 -11
- package/src/components/viewers/Scaffold.vue +17 -2
- package/src/components.d.ts +0 -1
- package/src/mixins/ContentMixin.js +72 -3
- package/src/mixins/DynamicMarkerMixin.js +44 -25
- package/src/services/tagging.js +3 -4
- package/src/stores/settings.js +5 -1
- package/src/stores/splitFlow.js +42 -30
- package/dist/Flatmap-9P71mP5D.js +0 -128
- package/dist/style-B-Ps72EF.js +0 -50
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "1.1.0
|
3
|
+
"version": "1.1.0",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vite --host --force",
|
@@ -48,10 +48,10 @@
|
|
48
48
|
"*.js"
|
49
49
|
],
|
50
50
|
"dependencies": {
|
51
|
-
"@abi-software/flatmapvuer": "^1.1.0
|
51
|
+
"@abi-software/flatmapvuer": "^1.1.0",
|
52
52
|
"@abi-software/map-side-bar": "^2.2.0",
|
53
53
|
"@abi-software/plotvuer": "1.0.0",
|
54
|
-
"@abi-software/scaffoldvuer": "^1.1.0
|
54
|
+
"@abi-software/scaffoldvuer": "^1.1.0",
|
55
55
|
"@abi-software/simulationvuer": "1.0.0",
|
56
56
|
"@abi-software/svg-sprite": "1.0.0",
|
57
57
|
"@element-plus/icons-vue": "^2.3.1",
|
@@ -89,7 +89,7 @@
|
|
89
89
|
"happy-dom": "^13.3.8",
|
90
90
|
"jsdom": "^16.2.2",
|
91
91
|
"jsdom-global": "^3.0.2",
|
92
|
-
"mocha": "^
|
92
|
+
"mocha": "^10.4.0",
|
93
93
|
"mochapack": "^2.1.4",
|
94
94
|
"mochawesome": "^7.1.3",
|
95
95
|
"mochawesome-merge": "^4.3.0",
|
@@ -124,6 +124,9 @@
|
|
124
124
|
}
|
125
125
|
]
|
126
126
|
},
|
127
|
+
"overrides": {
|
128
|
+
"@abi-software/flatmapvuer": "$@abi-software/flatmapvuer"
|
129
|
+
},
|
127
130
|
"browserslist": [
|
128
131
|
"> 1%",
|
129
132
|
"last 2 versions"
|
package/src/App.vue
CHANGED
@@ -32,7 +32,16 @@
|
|
32
32
|
</el-popover>
|
33
33
|
</div>
|
34
34
|
<div class="map-app">
|
35
|
-
<MapContent
|
35
|
+
<MapContent
|
36
|
+
ref="map"
|
37
|
+
:startingMap="startingMap"
|
38
|
+
:options="options"
|
39
|
+
:state="state"
|
40
|
+
:shareLink="shareLink"
|
41
|
+
:useHelpModeDialog="true"
|
42
|
+
@updateShareLinkRequested="updateUUID"
|
43
|
+
@isReady="mapIsReady"
|
44
|
+
/>
|
36
45
|
</div>
|
37
46
|
</div>
|
38
47
|
</template>
|
@@ -56,22 +56,34 @@ export default {
|
|
56
56
|
sckanReleaseDisplay: function() {
|
57
57
|
let sckanRelease = "Unknown"
|
58
58
|
if(this.mapImpProv){
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
59
|
+
sckanRelease = this.mapImpProv.connectivity?.npo.date
|
60
|
+
if (!sckanRelease) {
|
61
|
+
let sckanCreated = this.mapImpProv.sckan?.created ? this.mapImpProv.sckan.created : this.mapImpProv.sckan
|
62
|
+
let isoTime = sckanCreated.replace(',', '.') // Date time does not accept commas but Sckan uses them
|
63
|
+
sckanRelease = new Date(isoTime).toLocaleDateString('en-US', {
|
64
|
+
day: '2-digit',
|
65
|
+
month: 'long',
|
66
|
+
year: 'numeric',
|
67
|
+
})
|
68
|
+
}
|
69
|
+
if (!sckanRelease) {
|
70
|
+
sckanRelease = "Unknown";
|
71
|
+
}
|
66
72
|
}
|
67
73
|
return sckanRelease
|
68
74
|
},
|
69
75
|
sckanReleaseLink: function() {
|
70
|
-
let
|
76
|
+
let sckanLink = "Unknown"
|
71
77
|
if(this.mapImpProv){
|
72
|
-
|
78
|
+
sckanLink = this.mapImpProv.connectivity?.npo.path
|
79
|
+
if (!sckanLink) {
|
80
|
+
sckanLink = this.mapImpProv.sckan?.release
|
81
|
+
}
|
82
|
+
if (!sckanLink) {
|
83
|
+
sckanLink = "Unknown"
|
84
|
+
}
|
73
85
|
}
|
74
|
-
return
|
86
|
+
return sckanLink
|
75
87
|
},
|
76
88
|
flatmapSource: function() {
|
77
89
|
let flatmapSource = "Unknown"
|
@@ -24,6 +24,7 @@ import SplitFlow from './SplitFlow.vue';
|
|
24
24
|
import EventBus from './EventBus';
|
25
25
|
import { mapStores } from 'pinia';
|
26
26
|
import { useSettingsStore } from '../stores/settings';
|
27
|
+
import { useSplitFlowStore } from '../stores/splitFlow';
|
27
28
|
import { findSpeciesKey } from './scripts/utilities.js';
|
28
29
|
import { MapSvgSpriteColor} from '@abi-software/svg-sprite';
|
29
30
|
import { initialState } from "./scripts/utilities.js";
|
@@ -72,7 +73,16 @@ export default {
|
|
72
73
|
startingMap: {
|
73
74
|
type: String,
|
74
75
|
default: "AC"
|
75
|
-
}
|
76
|
+
},
|
77
|
+
/**
|
78
|
+
* To use help-mode-dialog when user clicks "Help".
|
79
|
+
* This option is available on Flatmap, MultiFlatmap, and Scaffold.
|
80
|
+
* When this is set to `true`, "Help" tooltips will be shown one by one.
|
81
|
+
*/
|
82
|
+
useHelpModeDialog: {
|
83
|
+
type: Boolean,
|
84
|
+
default: false,
|
85
|
+
},
|
76
86
|
},
|
77
87
|
data: function () {
|
78
88
|
return {
|
@@ -264,7 +274,7 @@ export default {
|
|
264
274
|
},
|
265
275
|
},
|
266
276
|
computed: {
|
267
|
-
...mapStores(useSettingsStore),
|
277
|
+
...mapStores(useSettingsStore, useSplitFlowStore),
|
268
278
|
stateToSet() {
|
269
279
|
return this.state ? this.state : this.initialState;
|
270
280
|
},
|
@@ -289,6 +299,7 @@ export default {
|
|
289
299
|
this.options.nlLinkPrefix ? this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix) : null
|
290
300
|
this.options.rootUrl ? this.settingsStore.updateRootUrl(this.options.rootUrl) : null
|
291
301
|
}
|
302
|
+
this.splitFlowStore?.reset();
|
292
303
|
},
|
293
304
|
mounted: async function() {
|
294
305
|
EventBus.on("updateShareLinkRequested", () => {
|
@@ -297,10 +308,17 @@ export default {
|
|
297
308
|
*/
|
298
309
|
this.$emit("updateShareLinkRequested");
|
299
310
|
});
|
311
|
+
EventBus.on('trackEvent', (taggingData) => {
|
312
|
+
/**
|
313
|
+
* This event triggers data tracking for Google Tag Manager (GTM) related to map interactions.
|
314
|
+
*/
|
315
|
+
this.$emit('trackEvent', taggingData);
|
316
|
+
});
|
300
317
|
if (!this.state) {
|
301
318
|
this.initialState = await initialState(this.startingMap, this.options.sparcApi);
|
302
319
|
}
|
303
320
|
this.isReady = true;
|
321
|
+
this.settingsStore.updateUseHelpModeDialog(this.useHelpModeDialog);
|
304
322
|
}
|
305
323
|
}
|
306
324
|
|
@@ -73,10 +73,10 @@ export default {
|
|
73
73
|
return refName;
|
74
74
|
},
|
75
75
|
getStyle: function(id) {
|
76
|
-
/*
|
77
|
-
Set the style based on the position of the spltters
|
76
|
+
/*
|
77
|
+
Set the style based on the position of the spltters
|
78
78
|
Header is 30px in height and the splitter is 1px in
|
79
|
-
height/width. The width, height and positon of the
|
79
|
+
height/width. The width, height and positon of the
|
80
80
|
viewer should take that into account.
|
81
81
|
*/
|
82
82
|
const refName = this.getRefsName(id);
|
@@ -124,7 +124,7 @@ export default {
|
|
124
124
|
return states;
|
125
125
|
},
|
126
126
|
setStyles: function(refName, rect) {
|
127
|
-
if (this.$refs &&
|
127
|
+
if (this.$refs && this.$refs.tabContainer) {
|
128
128
|
const bound = this.$refs.tabContainer.getBoundingClientRect();
|
129
129
|
const style = {};
|
130
130
|
style["width"] = `${rect.width}px`;
|
@@ -95,7 +95,6 @@ export default {
|
|
95
95
|
activeDockedId : 1,
|
96
96
|
filterTriggered: false,
|
97
97
|
availableFacets: [],
|
98
|
-
hoveredMarkerDelay: undefined,
|
99
98
|
}
|
100
99
|
},
|
101
100
|
watch: {
|
@@ -258,14 +257,7 @@ export default {
|
|
258
257
|
hoverChanged: function (data) {
|
259
258
|
const hoverEntries = data && data.anatomy ? data.anatomy : []
|
260
259
|
this.settingsStore.updateHoveredMarkers(hoverEntries);
|
261
|
-
|
262
|
-
this.hoveredMarkerDelay = setTimeout(() => {
|
263
|
-
EventBus.emit("markerUpdate");
|
264
|
-
}, 3000)
|
265
|
-
} else {
|
266
|
-
clearTimeout(this.hoveredMarkerDelay)
|
267
|
-
EventBus.emit("markerUpdate");
|
268
|
-
}
|
260
|
+
EventBus.emit("markerUpdate");
|
269
261
|
},
|
270
262
|
searchChanged: function (data) {
|
271
263
|
if (data && data.type == "query-update") {
|
@@ -487,6 +479,11 @@ export default {
|
|
487
479
|
EventBus.on("OpenNewMap", type => {
|
488
480
|
this.openNewMap(type);
|
489
481
|
});
|
482
|
+
EventBus.on("startHelp", () => {
|
483
|
+
if (this.$refs.sideBar) {
|
484
|
+
this.$refs.sideBar.close();
|
485
|
+
}
|
486
|
+
});
|
490
487
|
this.$nextTick(() => {
|
491
488
|
if (this.search === "" && this._facets.length === 0) {
|
492
489
|
if (this.$refs.sideBar) {
|
@@ -8,6 +8,12 @@
|
|
8
8
|
style="height: 100%; width: 100%"
|
9
9
|
:minZoom="entry.minZoom"
|
10
10
|
:helpMode="helpMode"
|
11
|
+
:helpModeActiveItem="helpModeActiveItem"
|
12
|
+
:helpModeInitialIndex="-1"
|
13
|
+
:helpModeDialog="useHelpModeDialog"
|
14
|
+
@help-mode-last-item="onHelpModeLastItem"
|
15
|
+
@shown-tooltip="onTooltipShown"
|
16
|
+
@shown-map-tooltip="onMapTooltipShown"
|
11
17
|
:pathControls="true"
|
12
18
|
ref="flatmap"
|
13
19
|
@ready="flatmapReadyCall"
|
@@ -19,11 +25,21 @@
|
|
19
25
|
@open-map="openMap"
|
20
26
|
@pathway-selection-changed="onPathwaySelectionChanged"
|
21
27
|
/>
|
28
|
+
|
29
|
+
<HelpModeDialog
|
30
|
+
v-if="helpMode && useHelpModeDialog"
|
31
|
+
ref="flatmapHelp"
|
32
|
+
:flatmapRef="flatmapRef"
|
33
|
+
:lastItem="helpModeLastItem"
|
34
|
+
@show-next="onHelpModeShowNext"
|
35
|
+
@finish-help-mode="onFinishHelpMode"
|
36
|
+
/>
|
22
37
|
</template>
|
23
38
|
|
24
39
|
<script>
|
25
40
|
/* eslint-disable no-alert, no-console */
|
26
|
-
import { FlatmapVuer } from "@abi-software/flatmapvuer";
|
41
|
+
import { FlatmapVuer, HelpModeDialog } from "@abi-software/flatmapvuer";
|
42
|
+
import Tagging from '../../services/tagging.js';
|
27
43
|
import EventBus from "../EventBus";
|
28
44
|
import ContentMixin from "../../mixins/ContentMixin";
|
29
45
|
import DynamicMarkerMixin from "../../mixins/DynamicMarkerMixin";
|
@@ -35,6 +51,7 @@ export default {
|
|
35
51
|
mixins: [ ContentMixin, DynamicMarkerMixin ],
|
36
52
|
components: {
|
37
53
|
FlatmapVuer,
|
54
|
+
HelpModeDialog,
|
38
55
|
},
|
39
56
|
methods: {
|
40
57
|
getState: function () {
|
@@ -47,11 +64,12 @@ export default {
|
|
47
64
|
return this.$refs.flatmap.searchAndShowResult(term);
|
48
65
|
},
|
49
66
|
getFlatmapImp() {
|
50
|
-
return this.$refs.flatmap
|
67
|
+
return this.$refs.flatmap?.mapImp;
|
51
68
|
},
|
52
69
|
flatmaprResourceSelected: function (type, resource) {
|
53
70
|
this.resourceSelected(
|
54
|
-
type, resource, (this.$refs.
|
71
|
+
type, resource, (this.$refs.flatmap.viewingMode === "Exploration"));
|
72
|
+
|
55
73
|
if (resource.eventType === 'click' && resource.feature.type === 'feature') {
|
56
74
|
const eventData = {
|
57
75
|
label: resource.label || '',
|
@@ -66,7 +84,7 @@ export default {
|
|
66
84
|
'event': 'interaction_event',
|
67
85
|
'event_name': 'portal_maps_connectivity',
|
68
86
|
'category': paramString,
|
69
|
-
"location": type + ' ' + this.$refs.
|
87
|
+
"location": type + ' ' + this.$refs.flatmap.viewingMode
|
70
88
|
});
|
71
89
|
}
|
72
90
|
},
|
@@ -142,7 +160,7 @@ export default {
|
|
142
160
|
mounted: function() {
|
143
161
|
this.getAvailableTerms();
|
144
162
|
EventBus.on("markerUpdate", () => {
|
145
|
-
this.
|
163
|
+
this.flatmapMarkerZoomUpdate(true, undefined);
|
146
164
|
});
|
147
165
|
},
|
148
166
|
};
|
@@ -8,6 +8,11 @@
|
|
8
8
|
style="height: 100%; width: 100%"
|
9
9
|
:initial="entry.resource"
|
10
10
|
:helpMode="helpMode"
|
11
|
+
:helpModeActiveItem="helpModeActiveItem"
|
12
|
+
:helpModeDialog="useHelpModeDialog"
|
13
|
+
@help-mode-last-item="onHelpModeLastItem"
|
14
|
+
@shown-tooltip="onTooltipShown"
|
15
|
+
@shown-map-tooltip="onMapTooltipShown"
|
11
16
|
ref="multiflatmap"
|
12
17
|
:displayMinimap="true"
|
13
18
|
:showStarInLegend="showStarInLegend"
|
@@ -17,15 +22,25 @@
|
|
17
22
|
:sparcAPI="apiLocation"
|
18
23
|
@pan-zoom-callback="flatmapPanZoomCallback"
|
19
24
|
@open-map="openMap"
|
25
|
+
@finish-help-mode="endHelp"
|
20
26
|
@pathway-selection-changed="onPathwaySelectionChanged"
|
21
27
|
@open-pubmed-url="onOpenPubmedUrl"
|
22
28
|
/>
|
29
|
+
|
30
|
+
<HelpModeDialog
|
31
|
+
v-if="helpMode && useHelpModeDialog"
|
32
|
+
ref="multiflatmapHelp"
|
33
|
+
:multiflatmapRef="multiflatmapRef"
|
34
|
+
:lastItem="helpModeLastItem"
|
35
|
+
@show-next="onHelpModeShowNext"
|
36
|
+
@finish-help-mode="onFinishHelpMode"
|
37
|
+
/>
|
23
38
|
</template>
|
24
39
|
|
25
40
|
<script>
|
26
41
|
/* eslint-disable no-alert, no-console */
|
27
42
|
import Tagging from '../../services/tagging.js';
|
28
|
-
import { MultiFlatmapVuer } from "@abi-software/flatmapvuer";
|
43
|
+
import { MultiFlatmapVuer, HelpModeDialog } from "@abi-software/flatmapvuer";
|
29
44
|
import ContentMixin from "../../mixins/ContentMixin";
|
30
45
|
import EventBus from "../EventBus";
|
31
46
|
import {
|
@@ -73,6 +88,7 @@ export default {
|
|
73
88
|
mixins: [ContentMixin, DyncamicMarkerMixin],
|
74
89
|
components: {
|
75
90
|
MultiFlatmapVuer,
|
91
|
+
HelpModeDialog,
|
76
92
|
},
|
77
93
|
data: function () {
|
78
94
|
return {
|
@@ -137,6 +153,7 @@ export default {
|
|
137
153
|
payload: payload,
|
138
154
|
type: this.entry.type,
|
139
155
|
};
|
156
|
+
this.flatmapMarkerZoomUpdate(false, undefined);
|
140
157
|
this.$emit("resource-selected", result);
|
141
158
|
}
|
142
159
|
},
|
@@ -226,6 +243,7 @@ export default {
|
|
226
243
|
this.$refs.multiflatmap
|
227
244
|
.getCurrentFlatmap()
|
228
245
|
.mapImp.panZoomTo(origin, [sW, sH]);
|
246
|
+
this.flatmapMarkerZoomUpdate(false, undefined);
|
229
247
|
}
|
230
248
|
}
|
231
249
|
},
|
@@ -302,12 +320,12 @@ export default {
|
|
302
320
|
flatmap.enablePanZoomEvents(true); // Use zoom events for dynamic markers
|
303
321
|
this.flatmapReady = true;
|
304
322
|
const flatmapImp = flatmap.mapImp;
|
305
|
-
this.
|
323
|
+
this.flatmapMarkerZoomUpdate(true, flatmapImp);
|
306
324
|
this.updateProvCard();
|
307
325
|
}
|
308
326
|
},
|
309
327
|
getFlatmapImp: function () {
|
310
|
-
if (this.entry.type === "MultiFlatmap" && this.flatmapReady) {
|
328
|
+
if (this.entry.type === "MultiFlatmap" && this.flatmapReady && this.$refs.multiflatmap) {
|
311
329
|
return this.$refs.multiflatmap.getCurrentFlatmap()["mapImp"];
|
312
330
|
} else {
|
313
331
|
return undefined;
|
@@ -364,7 +382,7 @@ export default {
|
|
364
382
|
const markerIdentifier = flatmapImp.addMarker(marker, {
|
365
383
|
element: wrapperElement,
|
366
384
|
className: "highlight-marker",
|
367
|
-
cluster: false
|
385
|
+
cluster: false
|
368
386
|
});
|
369
387
|
|
370
388
|
// update the store with the marker identifier
|
@@ -403,7 +421,7 @@ export default {
|
|
403
421
|
this.getFeaturedDatasets();
|
404
422
|
|
405
423
|
EventBus.on("markerUpdate", () => {
|
406
|
-
this.
|
424
|
+
this.flatmapMarkerZoomUpdate(true, undefined);
|
407
425
|
});
|
408
426
|
},
|
409
427
|
};
|
@@ -421,12 +439,6 @@ export default {
|
|
421
439
|
cursor: pointer !important;
|
422
440
|
z-index: 2;
|
423
441
|
}
|
424
|
-
&.hovered {
|
425
|
-
div {
|
426
|
-
scale: 2;
|
427
|
-
transform: translate(0px, -5px);
|
428
|
-
}
|
429
|
-
}
|
430
442
|
&.highlight-marker {
|
431
443
|
visibility: visible !important;
|
432
444
|
cursor: pointer !important;
|
@@ -436,6 +448,14 @@ export default {
|
|
436
448
|
transform: translate(45px, -7px);
|
437
449
|
}
|
438
450
|
}
|
451
|
+
&.hovered-marker {
|
452
|
+
cursor: pointer !important;
|
453
|
+
z-index: 2;
|
454
|
+
div {
|
455
|
+
scale: 2;
|
456
|
+
transform: translate(0px, -5px);
|
457
|
+
}
|
458
|
+
}
|
439
459
|
}
|
440
460
|
|
441
461
|
</style>
|
@@ -11,7 +11,12 @@
|
|
11
11
|
ref="scaffold"
|
12
12
|
:background-toggle="true"
|
13
13
|
:traditional="true"
|
14
|
-
:
|
14
|
+
:helpMode="helpMode"
|
15
|
+
:helpModeActiveItem="helpModeActiveItem"
|
16
|
+
:helpModeDialog="useHelpModeDialog"
|
17
|
+
@help-mode-last-item="onHelpModeLastItem"
|
18
|
+
@shown-tooltip="onTooltipShown"
|
19
|
+
@shown-map-tooltip="onMapTooltipShown"
|
15
20
|
:render="visible"
|
16
21
|
:display-latest-message="true"
|
17
22
|
:warning-message="warningMessage"
|
@@ -22,12 +27,21 @@
|
|
22
27
|
:markerLabels="markerLabels"
|
23
28
|
:flatmapAPI="flatmapAPI"
|
24
29
|
/>
|
30
|
+
|
31
|
+
<HelpModeDialog
|
32
|
+
v-if="helpMode && useHelpModeDialog"
|
33
|
+
ref="scaffoldHelp"
|
34
|
+
:scaffoldRef="scaffoldRef"
|
35
|
+
:lastItem="helpModeLastItem"
|
36
|
+
@show-next="onHelpModeShowNext"
|
37
|
+
@finish-help-mode="onFinishHelpMode"
|
38
|
+
/>
|
25
39
|
</template>
|
26
40
|
|
27
41
|
<script>
|
28
42
|
/* eslint-disable no-alert, no-console */
|
29
43
|
import EventBus from "../EventBus";
|
30
|
-
import { ScaffoldVuer } from "@abi-software/scaffoldvuer";
|
44
|
+
import { ScaffoldVuer, HelpModeDialog } from "@abi-software/scaffoldvuer";
|
31
45
|
import ContentMixin from "../../mixins/ContentMixin";
|
32
46
|
|
33
47
|
import "@abi-software/scaffoldvuer/dist/style.css";
|
@@ -37,6 +51,7 @@ export default {
|
|
37
51
|
mixins: [ ContentMixin ],
|
38
52
|
components: {
|
39
53
|
ScaffoldVuer,
|
54
|
+
HelpModeDialog,
|
40
55
|
},
|
41
56
|
methods: {
|
42
57
|
onResize: function () {
|
package/src/components.d.ts
CHANGED
@@ -22,7 +22,6 @@ declare module 'vue' {
|
|
22
22
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
23
23
|
ElIconArrowDown: typeof import('@element-plus/icons-vue')['ArrowDown']
|
24
24
|
ElIconArrowUp: typeof import('@element-plus/icons-vue')['ArrowUp']
|
25
|
-
ElIconInfoFilled: typeof import('@element-plus/icons-vue')['InfoFilled']
|
26
25
|
ElInput: typeof import('element-plus/es')['ElInput']
|
27
26
|
ElMain: typeof import('element-plus/es')['ElMain']
|
28
27
|
ElOption: typeof import('element-plus/es')['ElOption']
|
@@ -17,6 +17,7 @@ function capitalise(text) {
|
|
17
17
|
|
18
18
|
/* eslint-disable no-alert, no-console */
|
19
19
|
export default {
|
20
|
+
emits: [ "flatmap-provenance-ready", "resource-selected", "species-changed"],
|
20
21
|
props: {
|
21
22
|
/**
|
22
23
|
* Object containing information for
|
@@ -37,11 +38,18 @@ export default {
|
|
37
38
|
syncMode() {
|
38
39
|
return this.splitFlowStore.syncMode;
|
39
40
|
},
|
41
|
+
useHelpModeDialog() {
|
42
|
+
return this.settingsStore.useHelpModeDialog;
|
43
|
+
},
|
40
44
|
},
|
41
45
|
mounted: function () {
|
42
46
|
EventBus.on("startHelp", () => {
|
43
47
|
this.startHelp();
|
44
48
|
});
|
49
|
+
|
50
|
+
this.multiflatmapRef = this.$refs.multiflatmap;
|
51
|
+
this.flatmapRef = this.$refs.flatmap;
|
52
|
+
this.scaffoldRef = this.$refs.scaffold;
|
45
53
|
},
|
46
54
|
methods: {
|
47
55
|
toggleSyncMode: function () {
|
@@ -404,7 +412,7 @@ export default {
|
|
404
412
|
});
|
405
413
|
}
|
406
414
|
},
|
407
|
-
|
415
|
+
flatmapMarkerZoomUpdate() {
|
408
416
|
return;
|
409
417
|
},
|
410
418
|
onResize: function () {
|
@@ -413,17 +421,66 @@ export default {
|
|
413
421
|
startHelp: function () {
|
414
422
|
if (this.isInHelp === false) {
|
415
423
|
this.helpMode = true;
|
416
|
-
window.addEventListener("mousedown", this.
|
424
|
+
window.addEventListener("mousedown", this.checkEndHelpMouseDown);
|
417
425
|
this.isInHelp = true;
|
418
426
|
}
|
419
427
|
},
|
420
428
|
endHelp: function () {
|
421
|
-
window.removeEventListener("mousedown", this.
|
429
|
+
window.removeEventListener("mousedown", this.checkEndHelpMouseDown);
|
422
430
|
this.helpMode = false;
|
423
431
|
setTimeout(() => {
|
424
432
|
this.isInHelp = false;
|
425
433
|
}, 200);
|
426
434
|
},
|
435
|
+
onHelpModeShowNext: function () {
|
436
|
+
this.helpModeActiveItem += 1;
|
437
|
+
},
|
438
|
+
onHelpModeLastItem: function (isLastItem) {
|
439
|
+
if (isLastItem) {
|
440
|
+
this.helpModeLastItem = true;
|
441
|
+
}
|
442
|
+
},
|
443
|
+
onFinishHelpMode: function () {
|
444
|
+
this.helpMode = false;
|
445
|
+
// reset help mode to default values
|
446
|
+
this.helpModeActiveItem = 0;
|
447
|
+
this.helpModeLastItem = false;
|
448
|
+
},
|
449
|
+
onTooltipShown: function () {
|
450
|
+
if (this.$refs.multiflatmap && this.$refs.multiflatmapHelp) {
|
451
|
+
this.$refs.multiflatmapHelp.toggleTooltipHighlight();
|
452
|
+
}
|
453
|
+
|
454
|
+
if (this.$refs.flatmap && this.$refs.flatmapHelp) {
|
455
|
+
this.$refs.flatmapHelp.toggleTooltipHighlight();
|
456
|
+
}
|
457
|
+
|
458
|
+
if (this.$refs.scaffold && this.$refs.scaffoldHelp) {
|
459
|
+
this.$refs.scaffoldHelp.toggleTooltipHighlight();
|
460
|
+
}
|
461
|
+
},
|
462
|
+
onMapTooltipShown: function () {
|
463
|
+
if (this.$refs.multiflatmap && this.$refs.multiflatmapHelp) {
|
464
|
+
this.$refs.multiflatmapHelp.toggleTooltipPinHighlight();
|
465
|
+
}
|
466
|
+
|
467
|
+
if (this.$refs.flatmap && this.$refs.flatmapHelp) {
|
468
|
+
this.$refs.flatmapHelp.toggleTooltipPinHighlight();
|
469
|
+
}
|
470
|
+
|
471
|
+
if (this.$refs.scaffold && this.$refs.scaffoldHelp) {
|
472
|
+
this.$refs.scaffoldHelp.toggleTooltipPinHighlight();
|
473
|
+
}
|
474
|
+
},
|
475
|
+
/**
|
476
|
+
* End help-mode only if user clicks outside of help mode dialog.
|
477
|
+
*/
|
478
|
+
checkEndHelpMouseDown: function (e) {
|
479
|
+
const el = e.target;
|
480
|
+
if (!el.closest('.help-mode-dialog')) {
|
481
|
+
this.endHelp();
|
482
|
+
}
|
483
|
+
},
|
427
484
|
},
|
428
485
|
data: function () {
|
429
486
|
return {
|
@@ -436,6 +493,11 @@ export default {
|
|
436
493
|
bottom: "0px",
|
437
494
|
},
|
438
495
|
helpMode: false,
|
496
|
+
helpModeActiveItem: 0,
|
497
|
+
helpModeLastItem: false,
|
498
|
+
multiflatmapRef: null,
|
499
|
+
flatmapRef: null,
|
500
|
+
scaffoldRef: null,
|
439
501
|
idNamePair: {},
|
440
502
|
scaffoldLoaded: false,
|
441
503
|
isInHelp: false,
|
@@ -449,4 +511,11 @@ export default {
|
|
449
511
|
if (this.settingsStore.sparcApi)
|
450
512
|
this.apiLocation = this.settingsStore.sparcApi;
|
451
513
|
},
|
514
|
+
watch: {
|
515
|
+
helpMode: function (newVal) {
|
516
|
+
if (!newVal) {
|
517
|
+
this.helpModeActiveItem = 0;
|
518
|
+
}
|
519
|
+
}
|
520
|
+
},
|
452
521
|
};
|