@abi-software/map-side-bar 2.5.3-beta.9 → 2.6.1-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/map-side-bar.js +10673 -38403
- package/dist/map-side-bar.umd.cjs +63 -521
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +10 -1
- package/src/components/ConnectivityInfo.vue +44 -27
- package/src/components/SearchFilters.vue +87 -39
- package/src/components/SearchHistory.vue +20 -4
- package/src/components/SidebarContent.vue +1 -0
- package/src/components.d.ts +0 -1
- package/src/exampleConnectivityInput.js +1 -4
- package/vite.config.js +5 -4
- package/src/components/ExternalResourceCard.vue +0 -113
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/map-side-bar",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1-beta.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/*",
|
|
6
6
|
"src/*",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@abi-software/gallery": "^1.1.2",
|
|
42
|
-
"@abi-software/map-utilities": "^1.
|
|
42
|
+
"@abi-software/map-utilities": "^1.3.1-beta.0",
|
|
43
43
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
44
44
|
"@element-plus/icons-vue": "^2.3.1",
|
|
45
45
|
"algoliasearch": "^4.10.5",
|
package/src/App.vue
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
<div class="options-container">
|
|
8
8
|
<div>Click arrow to open sidebar</div>
|
|
9
9
|
<el-button @click="openSearch">search Uberon from refs</el-button>
|
|
10
|
-
<el-button @click="singleFacets">Add heart to Filter</el-button>
|
|
10
|
+
<el-button @click="singleFacets">Add heart to Filter (facet2 set)</el-button>
|
|
11
11
|
<el-button @click="addStomach">Add stomach to Filter</el-button>
|
|
12
|
+
<el-button @click="addInferiorVagus">Add inferior vagus to Filter (incorrect case)</el-button>
|
|
12
13
|
<el-button @click="addInvalidTerm">Add invalid term to Filter</el-button>
|
|
13
14
|
<el-button @click="multiFacets">multiple facets</el-button>
|
|
14
15
|
<el-button @click="neuronSearch">open neuron search</el-button>
|
|
@@ -187,6 +188,14 @@ export default {
|
|
|
187
188
|
AND: true,
|
|
188
189
|
})
|
|
189
190
|
},
|
|
191
|
+
addInferiorVagus: function () {
|
|
192
|
+
this.$refs.sideBar.addFilter({
|
|
193
|
+
facet: 'Inferior vagus X ganglion',
|
|
194
|
+
term: 'Anatomical structure',
|
|
195
|
+
facetPropPath: 'anatomy.organ.category.name',
|
|
196
|
+
AND: true,
|
|
197
|
+
})
|
|
198
|
+
},
|
|
190
199
|
addInvalidTerm: function () {
|
|
191
200
|
this.$refs.sideBar.addFilter({
|
|
192
201
|
facet: 'Invalid',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div v-if="entry" class="main" v-loading="loading">
|
|
3
3
|
<!-- Connectivity Info Title -->
|
|
4
4
|
<div class="connectivity-info-title">
|
|
5
|
-
<div>
|
|
5
|
+
<div class="title-content">
|
|
6
6
|
<div class="block" v-if="entry.title">
|
|
7
7
|
<div class="title">
|
|
8
8
|
{{ capitalise(entry.title) }}
|
|
@@ -35,9 +35,6 @@
|
|
|
35
35
|
<div class="block" v-else>
|
|
36
36
|
<div class="title">{{ entry.featureId }}</div>
|
|
37
37
|
</div>
|
|
38
|
-
<div class="block" v-if="resources.length">
|
|
39
|
-
<external-resource-card :resources="resources"></external-resource-card>
|
|
40
|
-
</div>
|
|
41
38
|
</div>
|
|
42
39
|
<div class="title-buttons">
|
|
43
40
|
<el-popover
|
|
@@ -199,8 +196,8 @@
|
|
|
199
196
|
</el-button>
|
|
200
197
|
</div>
|
|
201
198
|
|
|
202
|
-
<div
|
|
203
|
-
<div class="connectivity-error">
|
|
199
|
+
<div class="connectivity-error-container">
|
|
200
|
+
<div class="connectivity-error" v-if="connectivityError">
|
|
204
201
|
<strong v-if="connectivityError.errorConnectivities">
|
|
205
202
|
{{ connectivityError.errorConnectivities }}
|
|
206
203
|
</strong>
|
|
@@ -219,6 +216,10 @@
|
|
|
219
216
|
/>
|
|
220
217
|
</template>
|
|
221
218
|
</div>
|
|
219
|
+
|
|
220
|
+
<div class="content-container content-container-references" v-if="resources.length">
|
|
221
|
+
<external-resource-card :resources="resources" @references-loaded="onReferencesLoaded"></external-resource-card>
|
|
222
|
+
</div>
|
|
222
223
|
</div>
|
|
223
224
|
</template>
|
|
224
225
|
|
|
@@ -234,9 +235,13 @@ import {
|
|
|
234
235
|
ElContainer as Container,
|
|
235
236
|
ElIcon as Icon,
|
|
236
237
|
} from 'element-plus'
|
|
237
|
-
|
|
238
|
+
|
|
238
239
|
import EventBus from './EventBus.js'
|
|
239
|
-
import {
|
|
240
|
+
import {
|
|
241
|
+
CopyToClipboard,
|
|
242
|
+
ConnectivityGraph,
|
|
243
|
+
ExternalResourceCard,
|
|
244
|
+
} from '@abi-software/map-utilities';
|
|
240
245
|
import '@abi-software/map-utilities/dist/style.css';
|
|
241
246
|
|
|
242
247
|
const titleCase = (str) => {
|
|
@@ -307,6 +312,7 @@ export default {
|
|
|
307
312
|
connectivityError: null,
|
|
308
313
|
timeoutID: undefined,
|
|
309
314
|
graphViewLoaded: false,
|
|
315
|
+
updatedCopyContent: '',
|
|
310
316
|
}
|
|
311
317
|
},
|
|
312
318
|
watch: {
|
|
@@ -319,9 +325,6 @@ export default {
|
|
|
319
325
|
},
|
|
320
326
|
},
|
|
321
327
|
computed: {
|
|
322
|
-
updatedCopyContent: function () {
|
|
323
|
-
return this.getUpdateCopyContent();
|
|
324
|
-
},
|
|
325
328
|
resources: function () {
|
|
326
329
|
let resources = [];
|
|
327
330
|
if (this.entry && this.entry.hyperlinks) {
|
|
@@ -421,7 +424,10 @@ export default {
|
|
|
421
424
|
const name = data.map(t => t.label).join(', ');
|
|
422
425
|
this.toggleConnectivityTooltip(name, {show: true});
|
|
423
426
|
},
|
|
424
|
-
|
|
427
|
+
onReferencesLoaded: function (references) {
|
|
428
|
+
this.updatedCopyContent = this.getUpdateCopyContent(references);
|
|
429
|
+
},
|
|
430
|
+
getUpdateCopyContent: function (references) {
|
|
425
431
|
if (!this.entry) {
|
|
426
432
|
return '';
|
|
427
433
|
}
|
|
@@ -443,21 +449,6 @@ export default {
|
|
|
443
449
|
contentArray.push(`<div>${this.provSpeciesDescription}</div>`);
|
|
444
450
|
}
|
|
445
451
|
|
|
446
|
-
// PubMed URL
|
|
447
|
-
if (this.resources?.length) {
|
|
448
|
-
const pubmedContents = [];
|
|
449
|
-
this.resources.forEach((resource) => {
|
|
450
|
-
let pubmedContent = '';
|
|
451
|
-
if (resource.id === 'pubmed') {
|
|
452
|
-
pubmedContent += `<div><strong>PubMed URL:</strong></div>`;
|
|
453
|
-
pubmedContent += '\n';
|
|
454
|
-
pubmedContent += `<div><a href="${resource.url}">${resource.url}</a></div>`;
|
|
455
|
-
}
|
|
456
|
-
pubmedContents.push(pubmedContent);
|
|
457
|
-
});
|
|
458
|
-
contentArray.push(pubmedContents.join('\n\n<br>'));
|
|
459
|
-
}
|
|
460
|
-
|
|
461
452
|
// entry.paths
|
|
462
453
|
if (this.entry.paths) {
|
|
463
454
|
contentArray.push(`<div>${this.entry.paths}</div>`);
|
|
@@ -513,6 +504,17 @@ export default {
|
|
|
513
504
|
contentArray.push(transformedDestinations);
|
|
514
505
|
}
|
|
515
506
|
|
|
507
|
+
// References
|
|
508
|
+
if (references) {
|
|
509
|
+
let contentString = `<div><strong>References</strong></div>`;
|
|
510
|
+
contentString += '\n';
|
|
511
|
+
const contentList = references.list
|
|
512
|
+
.map((item) => `<li>${item}</li>`)
|
|
513
|
+
.join('\n');
|
|
514
|
+
contentString += `<ul>${contentList}</ul>`;
|
|
515
|
+
contentArray.push(contentString);
|
|
516
|
+
}
|
|
517
|
+
|
|
516
518
|
return contentArray.join('\n\n<br>');
|
|
517
519
|
},
|
|
518
520
|
toggleConnectivityTooltip: function (name, option) {
|
|
@@ -597,6 +599,7 @@ export default {
|
|
|
597
599
|
},
|
|
598
600
|
},
|
|
599
601
|
mounted: function () {
|
|
602
|
+
this.updatedCopyContent = this.getUpdateCopyContent();
|
|
600
603
|
EventBus.on('connectivity-graph-error', (errorInfo) => {
|
|
601
604
|
this.pushConnectivityError(errorInfo);
|
|
602
605
|
});
|
|
@@ -617,6 +620,11 @@ export default {
|
|
|
617
620
|
flex-direction: row;
|
|
618
621
|
justify-content: space-between;
|
|
619
622
|
gap: 1rem;
|
|
623
|
+
|
|
624
|
+
.title-content {
|
|
625
|
+
flex: 1 0 0%;
|
|
626
|
+
max-width: 85%;
|
|
627
|
+
}
|
|
620
628
|
}
|
|
621
629
|
|
|
622
630
|
.title {
|
|
@@ -922,7 +930,10 @@ export default {
|
|
|
922
930
|
|
|
923
931
|
.title-buttons {
|
|
924
932
|
display: flex;
|
|
933
|
+
flex: 1 0 0%;
|
|
934
|
+
max-width: 15%;
|
|
925
935
|
flex-direction: row;
|
|
936
|
+
justify-content: end;
|
|
926
937
|
gap: 0.5rem;
|
|
927
938
|
|
|
928
939
|
:deep(.copy-clipboard-button) {
|
|
@@ -954,12 +965,18 @@ export default {
|
|
|
954
965
|
|
|
955
966
|
.content-container-connectivity {
|
|
956
967
|
position: relative;
|
|
968
|
+
|
|
969
|
+
&:not([style*="display: none"]) ~ .content-container-references {
|
|
970
|
+
margin-top: -1.25rem;
|
|
971
|
+
}
|
|
957
972
|
}
|
|
958
973
|
|
|
959
974
|
.connectivity-error-container {
|
|
960
975
|
position: sticky;
|
|
961
976
|
bottom: 0.5rem;
|
|
962
977
|
width: 100%;
|
|
978
|
+
min-height: 31px; // placeholder
|
|
979
|
+
margin-top: -10px !important;
|
|
963
980
|
display: flex;
|
|
964
981
|
flex-direction: row;
|
|
965
982
|
align-items: center;
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
placement="bottom-start"
|
|
16
16
|
:width="200"
|
|
17
17
|
trigger="hover"
|
|
18
|
+
:teleported="false"
|
|
19
|
+
ref="cascadeTagsPopover"
|
|
20
|
+
:persistent="false"
|
|
21
|
+
popper-class="cascade-tags-popper"
|
|
22
|
+
@show="onCascadeTagsPopoverShown"
|
|
18
23
|
>
|
|
19
24
|
<template #default>
|
|
20
25
|
<div class="el-tags-container">
|
|
@@ -59,14 +64,15 @@
|
|
|
59
64
|
@expand-change="cascadeExpandChange"
|
|
60
65
|
:show-all-levels="true"
|
|
61
66
|
popper-class="sidebar-cascader-popper"
|
|
67
|
+
:teleported="false"
|
|
62
68
|
/>
|
|
63
69
|
<div v-if="showFiltersText" class="filter-default-value">Filters</div>
|
|
64
70
|
<el-popover
|
|
65
71
|
title="How do filters work?"
|
|
66
72
|
width="250"
|
|
67
73
|
trigger="hover"
|
|
68
|
-
:append-to-body="false"
|
|
69
74
|
popper-class="popover"
|
|
75
|
+
:teleported="false"
|
|
70
76
|
>
|
|
71
77
|
<template #reference>
|
|
72
78
|
<MapSvgIcon icon="help" class="help" />
|
|
@@ -91,6 +97,7 @@
|
|
|
91
97
|
v-model="numberShown"
|
|
92
98
|
placeholder="10"
|
|
93
99
|
@change="numberShownChanged($event)"
|
|
100
|
+
:teleported="false"
|
|
94
101
|
>
|
|
95
102
|
<el-option
|
|
96
103
|
v-for="item in numberDatasetsShown"
|
|
@@ -168,6 +175,7 @@ export default {
|
|
|
168
175
|
showFiltersText: true,
|
|
169
176
|
cascadeSelected: [],
|
|
170
177
|
cascadeSelectedWithBoolean: [],
|
|
178
|
+
filterTimeout: null,
|
|
171
179
|
numberShown: 10,
|
|
172
180
|
filters: [],
|
|
173
181
|
facets: ['Species', 'Gender', 'Organ', 'Datasets'],
|
|
@@ -477,10 +485,18 @@ export default {
|
|
|
477
485
|
filters = [];
|
|
478
486
|
}
|
|
479
487
|
|
|
488
|
+
// timeout: add delay for filter checkboxes
|
|
489
|
+
if (this.filterTimeout) {
|
|
490
|
+
clearTimeout(this.filterTimeout);
|
|
491
|
+
}
|
|
492
|
+
|
|
480
493
|
this.$emit('loading', true) // let sidebarcontent wait for the requests
|
|
481
|
-
this.$emit('filterResults', filters) // emit filters for apps above sidebar
|
|
482
494
|
this.setCascader(filterKeys) //update our cascader v-model if we modified the event
|
|
483
|
-
|
|
495
|
+
|
|
496
|
+
this.filterTimeout = setTimeout(() => {
|
|
497
|
+
this.$emit('filterResults', filters) // emit filters for apps above sidebar
|
|
498
|
+
this.cssMods() // update css for the cascader
|
|
499
|
+
}, 600);
|
|
484
500
|
}
|
|
485
501
|
},
|
|
486
502
|
//this fucntion is needed as we previously stored booleans in the array of event that
|
|
@@ -737,19 +753,25 @@ export default {
|
|
|
737
753
|
*/
|
|
738
754
|
validateAndConvertFilterToHierarchical: function (filter) {
|
|
739
755
|
if (filter && filter.facet && filter.term) {
|
|
756
|
+
// Convert terms to lower case.
|
|
757
|
+
// Flatmap gives us Inferior vagus X ganglion but the term in Algolia
|
|
758
|
+
// is Inferior vagus x ganglion (there are other cases as well)
|
|
759
|
+
const lowercase = filter.facet.toLowerCase()
|
|
740
760
|
if (filter.facet2) {
|
|
741
761
|
return filter // if it has a second term we will assume it is hierarchical and return it as is
|
|
742
762
|
} else {
|
|
743
763
|
for (const firstLayer of this.options) {
|
|
744
764
|
if (firstLayer.value === filter.facetPropPath) {
|
|
745
765
|
for (const secondLayer of firstLayer.children) {
|
|
746
|
-
if (secondLayer.label ===
|
|
766
|
+
if (secondLayer.label?.toLowerCase() === lowercase) {
|
|
747
767
|
// if we find a match on the second level, the filter will already be correct
|
|
768
|
+
// Make sure the case matches the one from Algolia
|
|
769
|
+
filter.facet = secondLayer.label
|
|
748
770
|
return filter
|
|
749
771
|
} else {
|
|
750
772
|
if (secondLayer.children && secondLayer.children.length > 0) {
|
|
751
773
|
for (const thirdLayer of secondLayer.children) {
|
|
752
|
-
if (thirdLayer.label ===
|
|
774
|
+
if (thirdLayer.label?.toLowerCase() === lowercase) {
|
|
753
775
|
// If we find a match on the third level, we need to switch facet1 to facet2
|
|
754
776
|
// and populate facet1 with its parents label.
|
|
755
777
|
filter.facet2 = thirdLayer.label
|
|
@@ -782,6 +804,48 @@ export default {
|
|
|
782
804
|
}
|
|
783
805
|
return []
|
|
784
806
|
},
|
|
807
|
+
onCascadeTagsPopoverShown: function () {
|
|
808
|
+
const cascadeTagsPopover = this.$refs.cascadeTagsPopover;
|
|
809
|
+
const fullscreenContainer = document.querySelector('.mapcontent');
|
|
810
|
+
const cascader = this.$refs.cascader;
|
|
811
|
+
|
|
812
|
+
if (cascader && cascadeTagsPopover) {
|
|
813
|
+
const cascaderZIndex = cascader.contentRef?.style.zIndex;
|
|
814
|
+
const cascaderTagZIndex = (cascaderZIndex * 1) + 1;
|
|
815
|
+
const cascadeTagsPopoverContentRef = cascadeTagsPopover.popperRef?.contentRef;
|
|
816
|
+
|
|
817
|
+
if (cascadeTagsPopoverContentRef) {
|
|
818
|
+
cascadeTagsPopoverContentRef.style.zIndex = cascaderTagZIndex;
|
|
819
|
+
|
|
820
|
+
if (fullscreenContainer) {
|
|
821
|
+
fullscreenContainer.append(cascadeTagsPopoverContentRef);
|
|
822
|
+
} else {
|
|
823
|
+
document.body.append(cascadeTagsPopoverContentRef);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
// Work around to fix the first time replacement position
|
|
827
|
+
window.dispatchEvent(new Event('resize'));
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
/**
|
|
832
|
+
* Move the cascader(panel) under map container
|
|
833
|
+
* so that it will work on fulscreen mode
|
|
834
|
+
*/
|
|
835
|
+
replaceCascader: function () {
|
|
836
|
+
const fullscreenContainer = document.querySelector('.mapcontent');
|
|
837
|
+
const cascader = this.$refs.cascader;
|
|
838
|
+
|
|
839
|
+
if (cascader) {
|
|
840
|
+
const cascaderEl = cascader.contentRef;
|
|
841
|
+
|
|
842
|
+
if (fullscreenContainer) {
|
|
843
|
+
fullscreenContainer.append(cascaderEl);
|
|
844
|
+
} else {
|
|
845
|
+
document.body.append(cascaderEl);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
},
|
|
785
849
|
},
|
|
786
850
|
mounted: function () {
|
|
787
851
|
this.algoliaClient = markRaw(new AlgoliaClient(
|
|
@@ -796,6 +860,7 @@ export default {
|
|
|
796
860
|
this.setCascader(this.entry.filterFacets)
|
|
797
861
|
this.cssMods()
|
|
798
862
|
this.$emit('cascaderReady')
|
|
863
|
+
this.replaceCascader();
|
|
799
864
|
})
|
|
800
865
|
},
|
|
801
866
|
}
|
|
@@ -923,40 +988,9 @@ export default {
|
|
|
923
988
|
line-height: 18px;
|
|
924
989
|
}
|
|
925
990
|
|
|
926
|
-
.filters :deep(.el-popover
|
|
927
|
-
|
|
928
|
-
border-
|
|
929
|
-
}
|
|
930
|
-
.filters :deep(.el-popover[x-placement^='top'] .popper__arrow::after) {
|
|
931
|
-
border-top-color: #f3ecf6;
|
|
932
|
-
border-bottom-width: 0;
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
.filters :deep(.el-popover[x-placement^='bottom'] .popper__arrow) {
|
|
936
|
-
border-top-width: 0;
|
|
937
|
-
border-bottom-color: $app-primary-color;
|
|
938
|
-
}
|
|
939
|
-
.filters :deep(.el-popover[x-placement^='bottom'] .popper__arrow::after) {
|
|
940
|
-
border-top-width: 0;
|
|
941
|
-
border-bottom-color: #f3ecf6;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
.filters :deep(.el-popover[x-placement^='right'] .popper__arrow) {
|
|
945
|
-
border-right-color: $app-primary-color;
|
|
946
|
-
border-left-width: 0;
|
|
947
|
-
}
|
|
948
|
-
.filters :deep(.el-popover[x-placement^='right'] .popper__arrow::after) {
|
|
949
|
-
border-right-color: #f3ecf6;
|
|
950
|
-
border-left-width: 0;
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
.filters :deep(.el-popover[x-placement^='left'] .popper__arrow) {
|
|
954
|
-
border-right-width: 0;
|
|
955
|
-
border-left-color: $app-primary-color;
|
|
956
|
-
}
|
|
957
|
-
.filters :deep(.el-popover[x-placement^='left'] .popper__arrow::after) {
|
|
958
|
-
border-right-width: 0;
|
|
959
|
-
border-left-color: #f3ecf6;
|
|
991
|
+
.filters :deep(.el-popover .el-popper__arrow::before) {
|
|
992
|
+
background: #f3ecf6;
|
|
993
|
+
border-color: $app-primary-color;
|
|
960
994
|
}
|
|
961
995
|
</style>
|
|
962
996
|
|
|
@@ -1013,4 +1047,18 @@ export default {
|
|
|
1013
1047
|
background-color: $app-primary-color;
|
|
1014
1048
|
border-color: $app-primary-color;
|
|
1015
1049
|
}
|
|
1050
|
+
|
|
1051
|
+
.el-popover.cascade-tags-popper {
|
|
1052
|
+
background: #f3ecf6 !important;
|
|
1053
|
+
border: 1px solid $app-primary-color;
|
|
1054
|
+
border-radius: 4px;
|
|
1055
|
+
color: #303133 !important;
|
|
1056
|
+
font-size: 12px;
|
|
1057
|
+
line-height: 18px;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
.el-popover.cascade-tags-popper .el-popper__arrow::before {
|
|
1061
|
+
background: #f3ecf6;
|
|
1062
|
+
border-color: $app-primary-color;
|
|
1063
|
+
}
|
|
1016
1064
|
</style>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
<el-popover
|
|
14
14
|
width="auto"
|
|
15
15
|
trigger="hover"
|
|
16
|
+
:teleported="false"
|
|
16
17
|
:show-after="200"
|
|
17
18
|
:persistent="false"
|
|
18
19
|
popper-class="popover-dropdown"
|
|
@@ -32,7 +33,13 @@
|
|
|
32
33
|
<div v-else>
|
|
33
34
|
<span class="empty-saved-search">No Saved Searches</span>
|
|
34
35
|
</div>
|
|
35
|
-
<el-dropdown
|
|
36
|
+
<el-dropdown
|
|
37
|
+
trigger="click"
|
|
38
|
+
:hide-on-click="false"
|
|
39
|
+
:teleported="false"
|
|
40
|
+
class="search-history-dropdown"
|
|
41
|
+
popper-class="search-history-dropdown__popper"
|
|
42
|
+
>
|
|
36
43
|
<span class="el-dropdown-select">
|
|
37
44
|
Search history
|
|
38
45
|
<el-icon class="el-icon--right">
|
|
@@ -47,6 +54,7 @@
|
|
|
47
54
|
<el-popover
|
|
48
55
|
width="auto"
|
|
49
56
|
trigger="hover"
|
|
57
|
+
:teleported="false"
|
|
50
58
|
:show-after="200"
|
|
51
59
|
:persistent="false"
|
|
52
60
|
popper-class="popover-dropdown"
|
|
@@ -69,7 +77,7 @@
|
|
|
69
77
|
<el-popover
|
|
70
78
|
width="auto"
|
|
71
79
|
trigger="hover"
|
|
72
|
-
:teleported="
|
|
80
|
+
:teleported="false"
|
|
73
81
|
:show-after="200"
|
|
74
82
|
:persistent="false"
|
|
75
83
|
popper-class="popover-dropdown"
|
|
@@ -98,7 +106,7 @@
|
|
|
98
106
|
</el-button>
|
|
99
107
|
</template>
|
|
100
108
|
<span v-if="savedSearchHistory.length > 1 && !item.saved">
|
|
101
|
-
Please
|
|
109
|
+
Limit 2: Please remove a saved search before adding another.
|
|
102
110
|
</span>
|
|
103
111
|
<span v-else-if="item.saved">
|
|
104
112
|
Remove from saved searches.
|
|
@@ -110,7 +118,7 @@
|
|
|
110
118
|
<el-popover
|
|
111
119
|
width="auto"
|
|
112
120
|
trigger="hover"
|
|
113
|
-
:teleported="
|
|
121
|
+
:teleported="false"
|
|
114
122
|
:show-after="200"
|
|
115
123
|
:persistent="false"
|
|
116
124
|
popper-class="popover-dropdown"
|
|
@@ -422,6 +430,7 @@ export default {
|
|
|
422
430
|
align-items: center;
|
|
423
431
|
justify-content: space-between;
|
|
424
432
|
padding-bottom: 6px;
|
|
433
|
+
z-index: 2;
|
|
425
434
|
}
|
|
426
435
|
|
|
427
436
|
.empty-saved-search {
|
|
@@ -435,6 +444,7 @@ export default {
|
|
|
435
444
|
display: flex;
|
|
436
445
|
align-items: center;
|
|
437
446
|
gap: 6px;
|
|
447
|
+
transform: translateZ(0);
|
|
438
448
|
}
|
|
439
449
|
|
|
440
450
|
.search-tag.el-tag {
|
|
@@ -539,6 +549,10 @@ export default {
|
|
|
539
549
|
margin: 0;
|
|
540
550
|
}
|
|
541
551
|
}
|
|
552
|
+
|
|
553
|
+
:deep(.search-history-dropdown__popper) {
|
|
554
|
+
position: fixed !important;
|
|
555
|
+
}
|
|
542
556
|
</style>
|
|
543
557
|
|
|
544
558
|
<style lang="scss">
|
|
@@ -595,9 +609,11 @@ export default {
|
|
|
595
609
|
max-width: 240px;
|
|
596
610
|
font-family: Asap;
|
|
597
611
|
font-size: 12px;
|
|
612
|
+
white-space: normal;
|
|
598
613
|
word-break: break-word;
|
|
599
614
|
text-align: left;
|
|
600
615
|
color: inherit;
|
|
616
|
+
position: fixed !important;
|
|
601
617
|
background: #f3ecf6 !important;
|
|
602
618
|
border: 1px solid $app-primary-color;
|
|
603
619
|
|
package/src/components.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ declare module 'vue' {
|
|
|
34
34
|
ElRow: typeof import('element-plus/es')['ElRow']
|
|
35
35
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
36
36
|
ElTag: typeof import('element-plus/es')['ElTag']
|
|
37
|
-
ExternalResourceCard: typeof import('./components/ExternalResourceCard.vue')['default']
|
|
38
37
|
ImageGallery: typeof import('./components/ImageGallery.vue')['default']
|
|
39
38
|
SearchFilters: typeof import('./components/SearchFilters.vue')['default']
|
|
40
39
|
SearchHistory: typeof import('./components/SearchHistory.vue')['default']
|
|
@@ -274,10 +274,7 @@ export default {
|
|
|
274
274
|
"ilxtr:neuron-type-aacar-5"
|
|
275
275
|
],
|
|
276
276
|
"hyperlinks": [
|
|
277
|
-
|
|
278
|
-
"url": "https://pubmed.ncbi.nlm.nih.gov/?term=%2F%2Fwww.ncbi.nlm.nih.gov%2Fpubmed%2F27783854",
|
|
279
|
-
"id": "pubmed"
|
|
280
|
-
}
|
|
277
|
+
"https://doi.org/10.1002/cphy.c150046"
|
|
281
278
|
],
|
|
282
279
|
"provenanceTaxonomy": [
|
|
283
280
|
"NCBITaxon:9606",
|
package/vite.config.js
CHANGED
|
@@ -38,11 +38,12 @@ export default defineConfig({
|
|
|
38
38
|
fileName: 'map-side-bar',
|
|
39
39
|
},
|
|
40
40
|
rollupOptions: {
|
|
41
|
-
external: ["vue"],
|
|
41
|
+
external: ["vue", "@abi-software/map-utilities"],
|
|
42
42
|
output: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
globals: {
|
|
44
|
+
vue: "Vue",
|
|
45
|
+
"@abi-software/map-utilities": "@abi-software/map-utilities"
|
|
46
|
+
},
|
|
46
47
|
},
|
|
47
48
|
},
|
|
48
49
|
},
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="resource-container">
|
|
3
|
-
<template v-for="resource in resources" :key="resource.id">
|
|
4
|
-
<div class="resource">
|
|
5
|
-
<el-button
|
|
6
|
-
v-if="resource.id === 'pubmed'"
|
|
7
|
-
class="button"
|
|
8
|
-
id="open-pubmed-button"
|
|
9
|
-
:icon="ElIconNotebook"
|
|
10
|
-
@click="openUrl(resource.url)"
|
|
11
|
-
>
|
|
12
|
-
Open publications in PubMed
|
|
13
|
-
</el-button>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
import { shallowRef } from 'vue'
|
|
21
|
-
import {
|
|
22
|
-
Notebook as ElIconNotebook,
|
|
23
|
-
} from '@element-plus/icons-vue'
|
|
24
|
-
/* eslint-disable no-alert, no-console */
|
|
25
|
-
import { ElButton as Button } from 'element-plus'
|
|
26
|
-
import EventBus from './EventBus'
|
|
27
|
-
|
|
28
|
-
export default {
|
|
29
|
-
name: 'ExternalResourceCard',
|
|
30
|
-
components: {
|
|
31
|
-
Button,
|
|
32
|
-
},
|
|
33
|
-
props: {
|
|
34
|
-
resources: {
|
|
35
|
-
type: Array,
|
|
36
|
-
default: () => [],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
data: function () {
|
|
40
|
-
return {
|
|
41
|
-
pubmeds: [],
|
|
42
|
-
pubmedIds: [],
|
|
43
|
-
ElIconNotebook: shallowRef(ElIconNotebook)
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
methods: {
|
|
47
|
-
capitalise: function (string) {
|
|
48
|
-
return string.charAt(0).toUpperCase() + string.slice(1)
|
|
49
|
-
},
|
|
50
|
-
openUrl: function (url) {
|
|
51
|
-
EventBus.emit('open-pubmed-url', url);
|
|
52
|
-
window.open(url, '_blank')
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
}
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<style lang="scss" scoped>
|
|
59
|
-
.resource-container {
|
|
60
|
-
margin-top: 0.5em;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.attribute-title {
|
|
64
|
-
font-size: 16px;
|
|
65
|
-
font-weight: 600;
|
|
66
|
-
/* font-weight: bold; */
|
|
67
|
-
text-transform: uppercase;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.attribute-content {
|
|
71
|
-
font-size: 14px;
|
|
72
|
-
font-weight: 400;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.el-link {
|
|
76
|
-
color: $app-primary-color;
|
|
77
|
-
text-decoration: none;
|
|
78
|
-
word-wrap: break-word;
|
|
79
|
-
&:hover,
|
|
80
|
-
&:focus {
|
|
81
|
-
color: $app-primary-color;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
:deep(.el-carousel__button) {
|
|
86
|
-
background-color: $app-primary-color;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.attribute-title {
|
|
90
|
-
font-size: 16px;
|
|
91
|
-
font-weight: 600;
|
|
92
|
-
/* font-weight: bold; */
|
|
93
|
-
text-transform: uppercase;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.button {
|
|
97
|
-
margin-left: 0px !important;
|
|
98
|
-
margin-top: 0px !important;
|
|
99
|
-
font-size: 14px !important;
|
|
100
|
-
background-color: $app-primary-color;
|
|
101
|
-
color: #fff;
|
|
102
|
-
&:hover {
|
|
103
|
-
color: #fff !important;
|
|
104
|
-
background: #ac76c5 !important;
|
|
105
|
-
border: 1px solid #ac76c5 !important;
|
|
106
|
-
}
|
|
107
|
-
& + .button {
|
|
108
|
-
margin-top: 10px !important;
|
|
109
|
-
background-color: $app-primary-color;
|
|
110
|
-
color: #fff;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
</style>
|