@abi-software/map-side-bar 2.2.1-beta.4 → 2.3.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 +23 -0
- package/dist/map-side-bar.js +2990 -2929
- package/dist/map-side-bar.umd.cjs +23 -23
- package/dist/style.css +1 -1
- package/package.json +7 -2
- package/reporter-config.json +10 -0
- package/src/components/ConnectivityInfo.vue +39 -0
- package/src/components/SideBar.vue +10 -2
- package/src/components.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/map-side-bar",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/*",
|
|
6
6
|
"src/*",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"serve": "vite --host",
|
|
13
13
|
"build-bundle": "vite build",
|
|
14
14
|
"preview": "vite preview",
|
|
15
|
-
"
|
|
15
|
+
"test": "cypress run --component",
|
|
16
|
+
"cypress:open": "cypress open",
|
|
16
17
|
"release:beta": "npm version prerelease --preid=beta; npm publish --tag beta",
|
|
17
18
|
"release:minor": "npm version minor; npm publish",
|
|
18
19
|
"release:patch": "npm version patch; npm publish",
|
|
@@ -57,8 +58,12 @@
|
|
|
57
58
|
"autoprefixer": "^10.4.17",
|
|
58
59
|
"chokidar": "^3.6.0",
|
|
59
60
|
"concurrently": "^8.2.2",
|
|
61
|
+
"cypress": "^13.13.0",
|
|
62
|
+
"cypress-multi-reporters": "^1.6.4",
|
|
63
|
+
"cypress-wait-until": "^3.0.1",
|
|
60
64
|
"eslint": "^8.56.0",
|
|
61
65
|
"eslint-plugin-vue": "^9.19.2",
|
|
66
|
+
"mochawesome": "^7.1.3",
|
|
62
67
|
"file-loader": "^5.0.2",
|
|
63
68
|
"raw-loader": "^0.5.1",
|
|
64
69
|
"sass": "^1.70.0",
|
|
@@ -20,6 +20,25 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
<external-resource-card :resources="resources"></external-resource-card>
|
|
22
22
|
</div>
|
|
23
|
+
<div>
|
|
24
|
+
<el-popover
|
|
25
|
+
width="200"
|
|
26
|
+
trigger="hover"
|
|
27
|
+
:teleported="false"
|
|
28
|
+
popper-class="popover-origin-help"
|
|
29
|
+
>
|
|
30
|
+
<template #reference>
|
|
31
|
+
<el-button class="button-circle" circle @click="showConnectivity(entry)">
|
|
32
|
+
<el-icon color="white">
|
|
33
|
+
<el-icon-location />
|
|
34
|
+
</el-icon>
|
|
35
|
+
</el-button>
|
|
36
|
+
</template>
|
|
37
|
+
<span>
|
|
38
|
+
Show connectivity on map
|
|
39
|
+
</span>
|
|
40
|
+
</el-popover>
|
|
41
|
+
</div>
|
|
23
42
|
</div>
|
|
24
43
|
<div v-if="featuresAlert" class="attribute-title-container">
|
|
25
44
|
<span class="attribute-title">Alert</span>
|
|
@@ -322,6 +341,12 @@ export default {
|
|
|
322
341
|
pubmedSearchUrlUpdate: function (val) {
|
|
323
342
|
this.pubmedSearchUrl = val
|
|
324
343
|
},
|
|
344
|
+
showConnectivity: function (entry) {
|
|
345
|
+
// move the map center to highlighted area
|
|
346
|
+
const featureIds = entry.featureId || [];
|
|
347
|
+
// connected to flatmapvuer > moveMap(featureIds) function
|
|
348
|
+
this.$emit('show-connectivity', featureIds);
|
|
349
|
+
},
|
|
325
350
|
},
|
|
326
351
|
}
|
|
327
352
|
</script>
|
|
@@ -338,6 +363,7 @@ export default {
|
|
|
338
363
|
display: flex;
|
|
339
364
|
flex-direction: row;
|
|
340
365
|
justify-content: space-between;
|
|
366
|
+
gap: 1rem;
|
|
341
367
|
}
|
|
342
368
|
|
|
343
369
|
.title {
|
|
@@ -363,6 +389,19 @@ export default {
|
|
|
363
389
|
width: 16rem;
|
|
364
390
|
}
|
|
365
391
|
|
|
392
|
+
.button-circle {
|
|
393
|
+
width: 24px !important;
|
|
394
|
+
height: 24px !important;
|
|
395
|
+
|
|
396
|
+
&,
|
|
397
|
+
&:hover,
|
|
398
|
+
&:focus,
|
|
399
|
+
&:active {
|
|
400
|
+
background-color: $app-primary-color;
|
|
401
|
+
border-color: $app-primary-color;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
366
405
|
.icon {
|
|
367
406
|
right: 0px;
|
|
368
407
|
position: absolute;
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
:availableAnatomyFacets="availableAnatomyFacets"
|
|
37
37
|
v-show="tab.id === activeTabId"
|
|
38
38
|
:ref="'connectivityTab_' + tab.id"
|
|
39
|
+
@show-connectivity="showConnectivity"
|
|
39
40
|
/>
|
|
40
41
|
</template>
|
|
41
42
|
<template v-else>
|
|
@@ -135,7 +136,7 @@ export default {
|
|
|
135
136
|
data: function () {
|
|
136
137
|
return {
|
|
137
138
|
drawerOpen: false,
|
|
138
|
-
|
|
139
|
+
availableAnatomyFacets: []
|
|
139
140
|
}
|
|
140
141
|
},
|
|
141
142
|
methods: {
|
|
@@ -146,6 +147,13 @@ export default {
|
|
|
146
147
|
hoverChanged: function (data) {
|
|
147
148
|
this.$emit('hover-changed', data)
|
|
148
149
|
},
|
|
150
|
+
/**
|
|
151
|
+
* This event is emitted when the show connectivity button is clicked.
|
|
152
|
+
* @arg featureIds
|
|
153
|
+
*/
|
|
154
|
+
showConnectivity: function (featureIds) {
|
|
155
|
+
this.$emit('show-connectivity', featureIds);
|
|
156
|
+
},
|
|
149
157
|
/**
|
|
150
158
|
* This event is emitted when the search filters are changed.
|
|
151
159
|
* @arg `obj` {data, id}
|
|
@@ -308,7 +316,7 @@ export default {
|
|
|
308
316
|
EventBus.on('available-facets', (payLoad) => {
|
|
309
317
|
this.availableAnatomyFacets = payLoad.find((facet) => facet.label === 'Anatomical Structure').children
|
|
310
318
|
})
|
|
311
|
-
|
|
319
|
+
|
|
312
320
|
},
|
|
313
321
|
}
|
|
314
322
|
</script>
|
package/src/components.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ declare module 'vue' {
|
|
|
17
17
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
|
18
18
|
ElIconArrowLeft: typeof import('@element-plus/icons-vue')['ArrowLeft']
|
|
19
19
|
ElIconArrowRight: typeof import('@element-plus/icons-vue')['ArrowRight']
|
|
20
|
+
ElIconLocation: typeof import('@element-plus/icons-vue')['Location']
|
|
20
21
|
ElIconWarning: typeof import('@element-plus/icons-vue')['Warning']
|
|
21
22
|
ElInput: typeof import('element-plus/es')['ElInput']
|
|
22
23
|
ElOption: typeof import('element-plus/es')['ElOption']
|