@abi-software/mapintegratedvuer 1.6.5 → 1.7.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/cypress.config.js +11 -0
- package/dist/{ContentMixin-Dqmcu7AX.js → ContentMixin-Bny6AX7L.js} +52 -305
- package/dist/{Flatmap-C4ZCpTFL.js → Flatmap-_71SkR8B.js} +56 -54
- package/dist/{Iframe-BAzjMejJ.js → Iframe-B0Gceqgo.js} +2 -2
- package/dist/{MultiFlatmap-DNeRMoti.js → MultiFlatmap-1OYvhH8W.js} +9 -7
- package/dist/{Plot-pIGKYWUT.js → Plot-NNWXz6_n.js} +2 -2
- package/dist/{Scaffold-DZcsIfCG.js → Scaffold-CbXO9X8d.js} +10195 -10157
- package/dist/{Simulation-WQ1pgEH2.js → Simulation-Db6fkT8B.js} +2 -2
- package/dist/index-Be9BtgnQ.js +67607 -0
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +560 -997
- package/dist/{style-erLsNC-s.js → style-Dmnajx5F.js} +7180 -7271
- package/dist/style.css +1 -1
- package/package.json +7 -6
- package/src/components/ContentBar.vue +68 -21
- package/src/components/viewers/Flatmap.vue +2 -0
- package/src/components/viewers/MultiFlatmap.vue +5 -2
- package/src/mixins/ContentMixin.js +10 -16
- package/src/mixins/DynamicMarkerMixin.js +0 -4
- package/src/stores/settings.js +4 -0
- package/dist/index-BV9-YgM-.js +0 -93441
- package/src/components/markerZoomLevelsHardCoded.js +0 -256
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.7.0",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vite --host --force",
|
@@ -50,12 +50,12 @@
|
|
50
50
|
"*.js"
|
51
51
|
],
|
52
52
|
"dependencies": {
|
53
|
-
"@abi-software/flatmapvuer": "
|
54
|
-
"@abi-software/map-side-bar": "
|
55
|
-
"@abi-software/map-utilities": "
|
53
|
+
"@abi-software/flatmapvuer": "1.7.0",
|
54
|
+
"@abi-software/map-side-bar": "2.6.0",
|
55
|
+
"@abi-software/map-utilities": "1.3.0",
|
56
56
|
"@abi-software/plotvuer": "^1.0.3",
|
57
|
-
"@abi-software/scaffoldvuer": "
|
58
|
-
"@abi-software/simulationvuer": "
|
57
|
+
"@abi-software/scaffoldvuer": "1.7.0",
|
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",
|
61
61
|
"@element-plus/icons-vue": "^2.3.1",
|
@@ -81,6 +81,7 @@
|
|
81
81
|
"concurrently": "^8.2.2",
|
82
82
|
"cypress": "^13.13.0",
|
83
83
|
"cypress-multi-reporters": "^1.6.4",
|
84
|
+
"cypress-visual-regression": "^5.2.2",
|
84
85
|
"cypress-wait-until": "^1.7.1",
|
85
86
|
"dom-parser": "^0.1.6",
|
86
87
|
"eslint": "^8.56.0",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<el-option
|
14
14
|
v-for="entry in entries"
|
15
15
|
:key="entry.id"
|
16
|
-
:label="
|
16
|
+
:label="getTitle(entry)"
|
17
17
|
:value="entry.id"
|
18
18
|
/>
|
19
19
|
</el-select>
|
@@ -126,6 +126,7 @@ export default {
|
|
126
126
|
boundariesElement: null, // this is set @vue:mounted by the parent component via the 'setBoundary' method
|
127
127
|
showDetails: true,
|
128
128
|
contextCardEntry: undefined,
|
129
|
+
titles: [],
|
129
130
|
}
|
130
131
|
},
|
131
132
|
computed: {
|
@@ -168,7 +169,18 @@ export default {
|
|
168
169
|
}
|
169
170
|
},
|
170
171
|
entries: function() {
|
171
|
-
|
172
|
+
this.titles = [];
|
173
|
+
return this.entriesStore.entries.map((entry) => {
|
174
|
+
const title = this.getEntryTitle(entry);
|
175
|
+
this.titles.push({
|
176
|
+
id: entry.id,
|
177
|
+
title: title,
|
178
|
+
});
|
179
|
+
return {
|
180
|
+
...entry,
|
181
|
+
title: title,
|
182
|
+
};
|
183
|
+
});
|
172
184
|
},
|
173
185
|
},
|
174
186
|
methods: {
|
@@ -184,13 +196,43 @@ export default {
|
|
184
196
|
type = "3D Scaffold";
|
185
197
|
title += type;
|
186
198
|
if (entry.datasetId)
|
187
|
-
title += "
|
199
|
+
title += " - " + entry.datasetId + "";
|
188
200
|
else if (entry.discoverId)
|
189
|
-
title += "
|
201
|
+
title += " - " + entry.discoverId + "";
|
202
|
+
|
190
203
|
return title;
|
191
204
|
}
|
192
205
|
return "Viewer";
|
193
206
|
},
|
207
|
+
getTitle: function(_entry) {
|
208
|
+
const {id, title} = _entry;
|
209
|
+
const foundTitles = this.titles.filter((t) => t.title === title);
|
210
|
+
|
211
|
+
if (foundTitles.length > 1) {
|
212
|
+
const titleList = [];
|
213
|
+
|
214
|
+
for (let i = 0; i < foundTitles.length; i++) {
|
215
|
+
const alpha = this.getCharById(i);
|
216
|
+
|
217
|
+
titleList.push({
|
218
|
+
id: foundTitles[i].id,
|
219
|
+
title: foundTitles[i].title + alpha,
|
220
|
+
});
|
221
|
+
}
|
222
|
+
|
223
|
+
const titleToReturn = titleList.find(t => t.id === id);
|
224
|
+
if (titleToReturn) {
|
225
|
+
return titleToReturn.title;
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
return title;
|
230
|
+
},
|
231
|
+
getCharById: function(id) {
|
232
|
+
// starts from char 'A'
|
233
|
+
const character = ' (' + String.fromCharCode(65 + id) + ')';
|
234
|
+
return character;
|
235
|
+
},
|
194
236
|
viewerChanged: function(value) {
|
195
237
|
if (this.entry.id && this.entry.id != value) {
|
196
238
|
this.splitFlowStore.assignOrSwapPaneWithIds({
|
@@ -261,32 +303,37 @@ export default {
|
|
261
303
|
display:flex;
|
262
304
|
flex-direction: row;
|
263
305
|
.select-box {
|
264
|
-
width:
|
265
|
-
height: 26px;
|
266
|
-
border-radius: 4px;
|
267
|
-
border: 1px solid rgb(144, 147, 153);
|
268
|
-
background-color: #fff;
|
269
|
-
font-weight: 500;
|
270
|
-
color: rgb(48, 49, 51);
|
271
|
-
margin-left: 8px;
|
272
|
-
margin-top: 3px;
|
273
|
-
margin-bottom: 2px;
|
306
|
+
max-width: 300px;
|
274
307
|
z-index: 5;
|
275
308
|
:deep(.el-select__wrapper) {
|
276
|
-
width:177px;
|
277
309
|
color: $app-primary-color;
|
278
|
-
height:
|
279
|
-
min-height:
|
280
|
-
line-height:
|
281
|
-
|
310
|
+
height: 29px;
|
311
|
+
min-height: 29px;
|
312
|
+
line-height: 29px;
|
313
|
+
font-weight: 500;
|
314
|
+
margin-top: 1px;
|
315
|
+
margin-left: 8px;
|
316
|
+
padding-left: 8px;
|
282
317
|
padding-right: 8px;
|
283
|
-
|
284
|
-
|
318
|
+
box-shadow: none !important;
|
319
|
+
background: transparent;
|
285
320
|
span {
|
286
321
|
color: $app-primary-color;
|
287
322
|
}
|
288
323
|
}
|
289
324
|
|
325
|
+
:deep(.el-select__placeholder) {
|
326
|
+
width: fit-content;
|
327
|
+
position: relative;
|
328
|
+
top: auto;
|
329
|
+
transform: none;
|
330
|
+
min-width: 80px;
|
331
|
+
}
|
332
|
+
|
333
|
+
:deep(.el-select__caret) {
|
334
|
+
color: $app-primary-color;
|
335
|
+
}
|
336
|
+
|
290
337
|
:deep(.el-input__icon) {
|
291
338
|
line-height: 24px;
|
292
339
|
color: $lightGrey;
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<FlatmapVuer
|
4
4
|
:state="entry.state"
|
5
5
|
:entry="entry.resource"
|
6
|
+
:mapManager="mapManager"
|
6
7
|
@resource-selected="flatmaprResourceSelected(entry.type, $event)"
|
7
8
|
@pan-zoom-callback="flatmapPanZoomCallback"
|
8
9
|
:name="entry.resource"
|
@@ -32,6 +33,7 @@
|
|
32
33
|
:sparcAPI="apiLocation"
|
33
34
|
@open-map="openMap"
|
34
35
|
@pathway-selection-changed="onPathwaySelectionChanged"
|
36
|
+
@mapmanager-loaded="onMapmanagerLoaded"
|
35
37
|
/>
|
36
38
|
|
37
39
|
<HelpModeDialog
|
@@ -5,6 +5,7 @@
|
|
5
5
|
@flatmapChanged="flatmapChanged"
|
6
6
|
@ready="multiFlatmapReady"
|
7
7
|
:state="entry.state"
|
8
|
+
:mapManager="mapManager"
|
8
9
|
@resource-selected="flatmaprResourceSelected(entry.type, $event)"
|
9
10
|
style="height: 100%; width: 100%"
|
10
11
|
:initial="entry.resource"
|
@@ -33,6 +34,7 @@
|
|
33
34
|
@finish-help-mode="endHelp"
|
34
35
|
@pathway-selection-changed="onPathwaySelectionChanged"
|
35
36
|
@open-pubmed-url="onOpenPubmedUrl"
|
37
|
+
@mapmanager-loaded="onMapmanagerLoaded"
|
36
38
|
/>
|
37
39
|
|
38
40
|
<HelpModeDialog
|
@@ -450,8 +452,9 @@ export default {
|
|
450
452
|
this.getFeaturedDatasets();
|
451
453
|
|
452
454
|
EventBus.on('annotation-close', (payload) => {
|
453
|
-
if (payload?.tabClose && this.$refs.multiflatmap
|
454
|
-
this.$refs.multiflatmap.getCurrentFlatmap()
|
455
|
+
if (payload?.tabClose && this.flatmapReady && this.$refs.multiflatmap) {
|
456
|
+
const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
|
457
|
+
currentFlatmap.annotationEventCallback({}, { type: 'aborted' })
|
455
458
|
}
|
456
459
|
});
|
457
460
|
|
@@ -4,7 +4,6 @@ import {
|
|
4
4
|
getParentsRegion,
|
5
5
|
} from "../components/SimulatedData.js";
|
6
6
|
import EventBus from "../components/EventBus";
|
7
|
-
import markerZoomLevels from "../components/markerZoomLevelsHardCoded.js";
|
8
7
|
import { mapStores } from 'pinia';
|
9
8
|
import { useSettingsStore } from '../stores/settings';
|
10
9
|
import { useSplitFlowStore } from '../stores/splitFlow';
|
@@ -77,6 +76,9 @@ export default {
|
|
77
76
|
|
78
77
|
this.onConnectivityInfoClose();
|
79
78
|
},
|
79
|
+
onMapmanagerLoaded: function (mapManager) {
|
80
|
+
this.settingsStore.updateMapManager(mapManager);
|
81
|
+
},
|
80
82
|
trackOpenMap: function (category) {
|
81
83
|
// GA Tagging
|
82
84
|
// Open map tracking
|
@@ -123,16 +125,13 @@ export default {
|
|
123
125
|
eventType: undefined,
|
124
126
|
};
|
125
127
|
|
128
|
+
|
126
129
|
if (type == "MultiFlatmap" || type == "Flatmap") {
|
127
|
-
result.internalName = this.idNamePair[resource.feature.models];
|
130
|
+
result.internalName = resource?.feature?.label ? resource.feature.label : this.idNamePair[resource.feature.models];
|
128
131
|
if (resource.eventType == "click") {
|
129
132
|
result.eventType = "selected";
|
130
133
|
if (resource.feature.type == "marker") {
|
131
|
-
let label =
|
132
|
-
let hardcodedAnnotation = markerZoomLevels.filter(
|
133
|
-
mz => mz.id === resource.feature.models
|
134
|
-
);
|
135
|
-
|
134
|
+
let label = result.internalName;
|
136
135
|
if (
|
137
136
|
this.settingsStore.isFeaturedMarkerIdentifier(
|
138
137
|
resource.feature.id
|
@@ -146,15 +145,6 @@ export default {
|
|
146
145
|
),
|
147
146
|
featuredDataset: true,
|
148
147
|
};
|
149
|
-
} else if (hardcodedAnnotation.filter(h => h.keyword).length > 0) {
|
150
|
-
// if it matches our stored keywords, it is a keyword search
|
151
|
-
// Keyword searches do not contain labels, so switch to keyword search if no label exists
|
152
|
-
returnedAction = {
|
153
|
-
type: "Search",
|
154
|
-
term:
|
155
|
-
"http://purl.obolibrary.org/obo/" +
|
156
|
-
resource.feature.models.replace(":", "_"),
|
157
|
-
};
|
158
148
|
} else {
|
159
149
|
// Facet search on anatomy if it is not a keyword search
|
160
150
|
returnedAction = {
|
@@ -525,6 +515,7 @@ export default {
|
|
525
515
|
scaffoldLoaded: false,
|
526
516
|
isInHelp: false,
|
527
517
|
hoverDelay: undefined,
|
518
|
+
mapManager: undefined,
|
528
519
|
};
|
529
520
|
},
|
530
521
|
created: function () {
|
@@ -534,6 +525,9 @@ export default {
|
|
534
525
|
this.flatmapAPI = this.settingsStore.flatmapAPI;
|
535
526
|
if (this.settingsStore.sparcApi)
|
536
527
|
this.apiLocation = this.settingsStore.sparcApi;
|
528
|
+
if (this.settingsStore.mapManager) {
|
529
|
+
this.mapManager = this.settingsStore.mapManager;
|
530
|
+
}
|
537
531
|
},
|
538
532
|
watch: {
|
539
533
|
helpMode: function (newVal) {
|
@@ -1,9 +1,7 @@
|
|
1
1
|
|
2
|
-
import markerZoomLevels from "../components/markerZoomLevelsHardCoded.js";
|
3
2
|
import { mapStores } from 'pinia';
|
4
3
|
import { useSettingsStore } from '../stores/settings';
|
5
4
|
|
6
|
-
|
7
5
|
// remove duplicates by stringifying the objects
|
8
6
|
const removeDuplicates = function (arrayOfAnything) {
|
9
7
|
if (!arrayOfAnything) return []
|
@@ -77,8 +75,6 @@ export default {
|
|
77
75
|
for (let j = 0; j < dataset.terms.length; j++) {
|
78
76
|
if (fma.includes(dataset.terms[j])) {
|
79
77
|
datasetAdjusted.terms.push(dataset.terms[j]);
|
80
|
-
|
81
|
-
|
82
78
|
}
|
83
79
|
}
|
84
80
|
markersOnFlatmap.push(datasetAdjusted);
|
package/src/stores/settings.js
CHANGED
@@ -14,6 +14,7 @@ export const useSettingsStore = defineStore('settings', {
|
|
14
14
|
flatmapAPI: undefined,
|
15
15
|
nlLinkPrefix: undefined,
|
16
16
|
flatmapAPI2: "https://mapcore-demo.org/curation/flatmap/",
|
17
|
+
mapManager: undefined,
|
17
18
|
rootUrl: undefined,
|
18
19
|
facets: { species: [], gender: [], organ: [] },
|
19
20
|
numberOfDatasetsForFacets: [],
|
@@ -67,6 +68,9 @@ export const useSettingsStore = defineStore('settings', {
|
|
67
68
|
updateFlatmapAPI2(flatmapAPI2) {
|
68
69
|
this.flatmapAPI2 = flatmapAPI2;
|
69
70
|
},
|
71
|
+
updateMapManager(mapManager) {
|
72
|
+
this.mapManager = mapManager;
|
73
|
+
},
|
70
74
|
updateNLLinkPrefix(nlLinkPrefix) {
|
71
75
|
this.nlLinkPrefix = nlLinkPrefix;
|
72
76
|
},
|