@abi-software/map-side-bar 2.14.1-simulation.8 → 2.14.2-demo.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 +14961 -19518
- package/dist/map-side-bar.umd.cjs +75 -84
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +0 -6
- package/src/components/BadgesGroup.vue +18 -48
- package/src/components/ConnectivityInfo.vue +126 -29
- package/src/components/DatasetCard.vue +8 -433
- package/src/components/DatasetExplorer.vue +138 -255
- package/src/components/ImageGallery.vue +359 -11
- package/src/components/SideBar.vue +0 -8
- package/src/components.d.ts +0 -5
- package/src/components/FileBrowser.vue +0 -252
- package/src/components/scripts/utilities.js +0 -50
|
@@ -1,123 +1,108 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
>
|
|
19
|
-
<template #reference>
|
|
20
|
-
<MapSvgIcon icon="help" class="help" />
|
|
21
|
-
</template>
|
|
22
|
-
<div>
|
|
23
|
-
<strong>Search rules:</strong>
|
|
24
|
-
<ul>
|
|
25
|
-
<li>
|
|
26
|
-
<strong>Multiple Terms:</strong> Separate terms with a comma (<code>,</code>).
|
|
27
|
-
This will find datasets that match any of the terms (an "OR" search).
|
|
28
|
-
</li>
|
|
29
|
-
<li>
|
|
30
|
-
<strong>Exact Phrase:</strong> Terms within a comma block will be matched as an exact phrase.
|
|
31
|
-
</li>
|
|
32
|
-
</ul>
|
|
33
|
-
<br/>
|
|
34
|
-
<strong>Examples:</strong>
|
|
35
|
-
<ul>
|
|
36
|
-
<li>
|
|
37
|
-
<strong>To find by exact phrase:</strong>
|
|
38
|
-
Searching for <code>vagus nerve</code> will find any dataset containing <code>"vagus nerve"</code>.
|
|
39
|
-
</li>
|
|
40
|
-
<li>
|
|
41
|
-
<strong>To find by multiple terms:</strong>
|
|
42
|
-
Searching for <code>nerve, vagus</code> will find data that contains either <code>nerve</code> OR <code>vagus</code>.
|
|
43
|
-
</li>
|
|
44
|
-
</ul>
|
|
45
|
-
</div>
|
|
46
|
-
</el-popover>
|
|
47
|
-
</div>
|
|
48
|
-
<el-button
|
|
49
|
-
type="primary"
|
|
50
|
-
class="button"
|
|
51
|
-
@click="searchEvent"
|
|
52
|
-
size="large"
|
|
2
|
+
<el-card :body-style="bodyStyle" class="content-card">
|
|
3
|
+
<template #header>
|
|
4
|
+
<div class="header">
|
|
5
|
+
<div class="search-input-container" :class="{'is-focus': searchInput}">
|
|
6
|
+
<el-input
|
|
7
|
+
class="search-input"
|
|
8
|
+
placeholder="Search"
|
|
9
|
+
v-model="searchInput"
|
|
10
|
+
@keyup="searchEvent"
|
|
11
|
+
clearable
|
|
12
|
+
@clear="clearSearchClicked"
|
|
13
|
+
></el-input>
|
|
14
|
+
<el-popover
|
|
15
|
+
width="350"
|
|
16
|
+
trigger="hover"
|
|
17
|
+
popper-class="filter-help-popover"
|
|
53
18
|
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<div class="error-feedback" v-if="results.length === 0 && !loadingCards">
|
|
83
|
-
No results found - Please change your search / filter criteria.
|
|
19
|
+
<template #reference>
|
|
20
|
+
<MapSvgIcon icon="help" class="help" />
|
|
21
|
+
</template>
|
|
22
|
+
<div>
|
|
23
|
+
<strong>Search rules:</strong>
|
|
24
|
+
<ul>
|
|
25
|
+
<li>
|
|
26
|
+
<strong>Multiple Terms:</strong> Separate terms with a comma (<code>,</code>).
|
|
27
|
+
This will find datasets that match any of the terms (an "OR" search).
|
|
28
|
+
</li>
|
|
29
|
+
<li>
|
|
30
|
+
<strong>Exact Phrase:</strong> Terms within a comma block will be matched as an exact phrase.
|
|
31
|
+
</li>
|
|
32
|
+
</ul>
|
|
33
|
+
<br/>
|
|
34
|
+
<strong>Examples:</strong>
|
|
35
|
+
<ul>
|
|
36
|
+
<li>
|
|
37
|
+
<strong>To find by exact phrase:</strong>
|
|
38
|
+
Searching for <code>vagus nerve</code> will find any dataset containing <code>"vagus nerve"</code>.
|
|
39
|
+
</li>
|
|
40
|
+
<li>
|
|
41
|
+
<strong>To find by multiple terms:</strong>
|
|
42
|
+
Searching for <code>nerve, vagus</code> will find data that contains either <code>nerve</code> OR <code>vagus</code>.
|
|
43
|
+
</li>
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
</el-popover>
|
|
84
47
|
</div>
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
48
|
+
<el-button
|
|
49
|
+
type="primary"
|
|
50
|
+
class="button"
|
|
51
|
+
@click="searchEvent"
|
|
52
|
+
size="large"
|
|
53
|
+
>
|
|
54
|
+
Search
|
|
55
|
+
</el-button>
|
|
56
|
+
<el-button
|
|
57
|
+
link
|
|
58
|
+
class="el-button-link"
|
|
59
|
+
@click="onResetClick"
|
|
60
|
+
size="large"
|
|
61
|
+
>
|
|
62
|
+
Reset
|
|
63
|
+
</el-button>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
<SearchFilters
|
|
67
|
+
class="filters"
|
|
68
|
+
ref="filtersRef"
|
|
69
|
+
:entry="filterEntry"
|
|
70
|
+
:envVars="envVars"
|
|
71
|
+
@filterResults="filterUpdate"
|
|
72
|
+
@numberPerPage="numberPerPageUpdate"
|
|
73
|
+
@loading="filtersLoading"
|
|
74
|
+
@cascaderReady="cascaderReady"
|
|
75
|
+
></SearchFilters>
|
|
76
|
+
<SearchHistory
|
|
77
|
+
ref="searchHistory"
|
|
78
|
+
localStorageKey="sparc.science-dataset-search-history"
|
|
79
|
+
@search="searchHistorySearch"
|
|
80
|
+
></SearchHistory>
|
|
81
|
+
<div class="content scrollbar" v-loading="loadingCards" ref="content">
|
|
82
|
+
<div class="error-feedback" v-if="results.length === 0 && !loadingCards">
|
|
83
|
+
No results found - Please change your search / filter criteria.
|
|
106
84
|
</div>
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<FileBrowser
|
|
115
|
-
ref="fileBrowserRef"
|
|
116
|
-
@fileActionTriggered="fileActionTriggered"
|
|
85
|
+
<div v-for="result in results" :key="result.doi" class="step-item">
|
|
86
|
+
<DatasetCard
|
|
87
|
+
class="dataset-card"
|
|
88
|
+
:entry="result"
|
|
89
|
+
:envVars="envVars"
|
|
90
|
+
@mouseenter="hoverChanged(result)"
|
|
91
|
+
@mouseleave="hoverChanged(undefined)"
|
|
117
92
|
/>
|
|
118
|
-
</
|
|
119
|
-
|
|
120
|
-
|
|
93
|
+
</div>
|
|
94
|
+
<el-pagination
|
|
95
|
+
class="pagination"
|
|
96
|
+
v-model:current-page="page"
|
|
97
|
+
hide-on-single-page
|
|
98
|
+
large
|
|
99
|
+
layout="prev, pager, next"
|
|
100
|
+
:page-size="numberPerPage"
|
|
101
|
+
:total="numberOfHits"
|
|
102
|
+
@current-change="pageChange"
|
|
103
|
+
></el-pagination>
|
|
104
|
+
</div>
|
|
105
|
+
</el-card>
|
|
121
106
|
</template>
|
|
122
107
|
|
|
123
108
|
<script>
|
|
@@ -125,20 +110,17 @@
|
|
|
125
110
|
import {
|
|
126
111
|
ElButton as Button,
|
|
127
112
|
ElCard as Card,
|
|
128
|
-
ElDialog as Dialog,
|
|
129
113
|
ElDrawer as Drawer,
|
|
130
114
|
ElIcon as Icon,
|
|
131
115
|
ElInput as Input,
|
|
132
116
|
ElPagination as Pagination,
|
|
133
117
|
ElMessage as Message,
|
|
134
118
|
} from 'element-plus'
|
|
135
|
-
import 'element-plus/es/components/message/style/css'
|
|
119
|
+
import 'element-plus/es/components/message/style/css';
|
|
136
120
|
import SearchFilters from './SearchFilters.vue'
|
|
137
121
|
import SearchHistory from './SearchHistory.vue'
|
|
138
122
|
import DatasetCard from './DatasetCard.vue'
|
|
139
|
-
import FileBrowser from './FileBrowser.vue'
|
|
140
123
|
import EventBus from './EventBus.js'
|
|
141
|
-
import { processProtocolsData } from './scripts/utilities.js'
|
|
142
124
|
|
|
143
125
|
import { AlgoliaClient } from '../algolia/algolia.js'
|
|
144
126
|
import { getFilters, facetPropPathMapping } from '../algolia/utils.js'
|
|
@@ -176,13 +158,11 @@ var initial_state = {
|
|
|
176
158
|
|
|
177
159
|
export default {
|
|
178
160
|
components: {
|
|
179
|
-
DatasetCard,
|
|
180
|
-
FileBrowser,
|
|
181
161
|
SearchFilters,
|
|
162
|
+
DatasetCard,
|
|
182
163
|
SearchHistory,
|
|
183
164
|
Button,
|
|
184
165
|
Card,
|
|
185
|
-
Dialog,
|
|
186
166
|
Drawer,
|
|
187
167
|
Icon,
|
|
188
168
|
Input,
|
|
@@ -219,13 +199,6 @@ export default {
|
|
|
219
199
|
display: 'flex',
|
|
220
200
|
},
|
|
221
201
|
cascaderIsReady: false,
|
|
222
|
-
fileBrowserTitle: "File Browser",
|
|
223
|
-
fileBrowserVisible: false,
|
|
224
|
-
fileSearch: {
|
|
225
|
-
onGoing: false,
|
|
226
|
-
datasetId: undefined,
|
|
227
|
-
searchTerm: undefined,
|
|
228
|
-
}
|
|
229
202
|
}
|
|
230
203
|
},
|
|
231
204
|
computed: {
|
|
@@ -243,25 +216,6 @@ export default {
|
|
|
243
216
|
},
|
|
244
217
|
},
|
|
245
218
|
methods: {
|
|
246
|
-
fileActionTriggered: function(action) {
|
|
247
|
-
EventBus.emit('PopoverActionClick', action)
|
|
248
|
-
EventBus.emit('contextUpdate', action) // Pass to mapintegratedvuer
|
|
249
|
-
this.fileBrowserVisible = true
|
|
250
|
-
},
|
|
251
|
-
fileInfoReady: function(payload) {
|
|
252
|
-
if (this.fileSearch.onGoing) {
|
|
253
|
-
if (payload.id === this.fileSearch.datasetID) {
|
|
254
|
-
payload.instance.openFileBrowser()
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
displayFileInfo: function(datasetID, fileSearch, searchTerm = "") {
|
|
259
|
-
let query = searchTerm ? searchTerm : datasetID
|
|
260
|
-
this.openSearch([], query)
|
|
261
|
-
this.fileSearch.onGoing = true
|
|
262
|
-
this.fileSearch.datasetID = datasetID
|
|
263
|
-
this.fileSearch.searchTerm = fileSearch
|
|
264
|
-
},
|
|
265
219
|
hoverChanged: function (data) {
|
|
266
220
|
const payload = data ? { ...data, tabType: 'dataset' } : { tabType: 'dataset' }
|
|
267
221
|
this.$emit('hover-changed', payload)
|
|
@@ -273,27 +227,6 @@ export default {
|
|
|
273
227
|
this.results = []
|
|
274
228
|
this.loadingCards = false
|
|
275
229
|
},
|
|
276
|
-
openFileBrowser: function(data) {
|
|
277
|
-
this.fileBrowserVisible = true
|
|
278
|
-
this.$nextTick(() => {
|
|
279
|
-
if (data.datasetID) {
|
|
280
|
-
this.fileBrowserTitle = `Dataset ${data.datasetID}`
|
|
281
|
-
if (data.datasetName) {
|
|
282
|
-
this.fileBrowserTitle += `: ${data.datasetName}`
|
|
283
|
-
}
|
|
284
|
-
} else {
|
|
285
|
-
this.fileBrowserTitle = "File Browser"
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
this.$refs.fileBrowserRef.setData(data.items)
|
|
289
|
-
if (this.fileSearch.onGoing) {
|
|
290
|
-
if (this.fileSearch.datasetID === data.datasetID) {
|
|
291
|
-
this.$refs.fileBrowserRef.setSearchTerm(this.fileSearch.searchTerm)
|
|
292
|
-
}
|
|
293
|
-
this.fileSearch.onGoing = false
|
|
294
|
-
}
|
|
295
|
-
})
|
|
296
|
-
},
|
|
297
230
|
openSearch: function (filter, search = '') {
|
|
298
231
|
this.searchInput = search
|
|
299
232
|
this.resetPageNavigation()
|
|
@@ -473,23 +406,6 @@ export default {
|
|
|
473
406
|
let i = this.results.findIndex((res) => res.doi === doi)
|
|
474
407
|
if (this.results[i]) this.results[i].detailsReady = true
|
|
475
408
|
},
|
|
476
|
-
readTestData: function () {
|
|
477
|
-
const endpoint = this.envVars.TEST_DATA_LOCATION
|
|
478
|
-
if (endpoint) {
|
|
479
|
-
fetch(endpoint)
|
|
480
|
-
.then(response => {
|
|
481
|
-
if (!response.ok) {
|
|
482
|
-
throw new Error(`Cannot download test data from server: ${response.status}`)
|
|
483
|
-
}
|
|
484
|
-
return response.json()
|
|
485
|
-
})
|
|
486
|
-
.then((data) => {
|
|
487
|
-
if (this.searchInput.toLowerCase().includes("reveal")) {
|
|
488
|
-
processProtocolsData(this.results, data, this.envVars.TEST_DATA_LOCATION)
|
|
489
|
-
}
|
|
490
|
-
})
|
|
491
|
-
}
|
|
492
|
-
},
|
|
493
409
|
perItemSearch: function (signal, data) {
|
|
494
410
|
//Maximum 10 downloads at once to prevent long waiting time
|
|
495
411
|
//between unfinished search and new search
|
|
@@ -518,11 +434,6 @@ export default {
|
|
|
518
434
|
//Check and make another request until it gets to max downloads
|
|
519
435
|
this.perItemSearch(signal, data)
|
|
520
436
|
}
|
|
521
|
-
} else {
|
|
522
|
-
//Do some post downloading hacking
|
|
523
|
-
if (this.searchInput.toLowerCase().includes("reveal")) {
|
|
524
|
-
this.readTestData();
|
|
525
|
-
}
|
|
526
437
|
}
|
|
527
438
|
},
|
|
528
439
|
scrollToTop: function () {
|
|
@@ -545,8 +456,6 @@ export default {
|
|
|
545
456
|
let i = this.results.findIndex((res) =>
|
|
546
457
|
element.doi ? element.doi.includes(res.doi) : false
|
|
547
458
|
)
|
|
548
|
-
|
|
549
|
-
|
|
550
459
|
// Assign scicrunch results to the object
|
|
551
460
|
Object.assign(this.results[i], element)
|
|
552
461
|
// Assign the attributes that need some processing
|
|
@@ -698,45 +607,6 @@ export default {
|
|
|
698
607
|
border: 0;
|
|
699
608
|
border-top-right-radius: 0;
|
|
700
609
|
border-bottom-right-radius: 0;
|
|
701
|
-
|
|
702
|
-
:deep(.el-card__header) {
|
|
703
|
-
background-color: #292b66;
|
|
704
|
-
padding: 1rem;
|
|
705
|
-
}
|
|
706
|
-
:deep(.el-card__body) {
|
|
707
|
-
background-color: #f7faff;
|
|
708
|
-
overflow-y: hidden;
|
|
709
|
-
padding: 1rem;
|
|
710
|
-
}
|
|
711
|
-
:deep(.el-card__body) {
|
|
712
|
-
background-color: #f7faff;
|
|
713
|
-
overflow-y: hidden;
|
|
714
|
-
padding: 1rem;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
:deep(.el-dialog) {
|
|
718
|
-
background: #f7faff;
|
|
719
|
-
padding: 8px;
|
|
720
|
-
border-width:1px;
|
|
721
|
-
.el-dialog__header {
|
|
722
|
-
padding-top: 8px;
|
|
723
|
-
padding-bottom: 8px;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
:deep(.el-message) {
|
|
728
|
-
position: absolute !important;
|
|
729
|
-
width: 80%;
|
|
730
|
-
font-size: 12px;
|
|
731
|
-
border-radius: var(--el-border-radius-base);
|
|
732
|
-
--el-message-bg-color: var(--el-color-error-light-9);
|
|
733
|
-
--el-message-border-color: var(--el-color-error);
|
|
734
|
-
--el-message-text-color: var(--el-text-color-primary);
|
|
735
|
-
|
|
736
|
-
.el-icon.el-message__icon {
|
|
737
|
-
display: none;
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
610
|
}
|
|
741
611
|
|
|
742
612
|
.step-item {
|
|
@@ -752,6 +622,30 @@ export default {
|
|
|
752
622
|
padding-top: 15px;
|
|
753
623
|
}
|
|
754
624
|
|
|
625
|
+
.content-card :deep(.el-card__header) {
|
|
626
|
+
background-color: #292b66;
|
|
627
|
+
padding: 1rem;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.content-card :deep(.el-card__body) {
|
|
631
|
+
background-color: #f7faff;
|
|
632
|
+
overflow-y: hidden;
|
|
633
|
+
padding: 1rem;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
.content-card :deep(.el-message) {
|
|
637
|
+
position: absolute !important;
|
|
638
|
+
width: 80%;
|
|
639
|
+
font-size: 12px;
|
|
640
|
+
border-radius: var(--el-border-radius-base);
|
|
641
|
+
--el-message-bg-color: var(--el-color-error-light-9);
|
|
642
|
+
--el-message-border-color: var(--el-color-error);
|
|
643
|
+
--el-message-text-color: var(--el-text-color-primary);
|
|
644
|
+
|
|
645
|
+
.el-icon.el-message__icon {
|
|
646
|
+
display: none;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
755
649
|
|
|
756
650
|
.content {
|
|
757
651
|
// width: 515px;
|
|
@@ -762,29 +656,21 @@ export default {
|
|
|
762
656
|
overflow-y: scroll;
|
|
763
657
|
scrollbar-width: thin;
|
|
764
658
|
border-radius: var(--el-border-radius-base);
|
|
659
|
+
}
|
|
765
660
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
:deep(.step-item:first-child .seperator-path) {
|
|
771
|
-
display: none;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
:deep(.step-item:not(:first-child) .seperator-path) {
|
|
775
|
-
width: 455px;
|
|
776
|
-
height: 0px;
|
|
777
|
-
border: solid 1px #e4e7ed;
|
|
778
|
-
background-color: #e4e7ed;
|
|
779
|
-
}
|
|
661
|
+
.content :deep(.el-loading-spinner .path) {
|
|
662
|
+
stroke: $app-primary-color;
|
|
663
|
+
}
|
|
780
664
|
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
665
|
+
.content :deep(.step-item:first-child .seperator-path) {
|
|
666
|
+
display: none;
|
|
667
|
+
}
|
|
784
668
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
669
|
+
.content :deep(.step-item:not(:first-child) .seperator-path) {
|
|
670
|
+
width: 455px;
|
|
671
|
+
height: 0px;
|
|
672
|
+
border: solid 1px #e4e7ed;
|
|
673
|
+
background-color: #e4e7ed;
|
|
788
674
|
}
|
|
789
675
|
|
|
790
676
|
.scrollbar::-webkit-scrollbar-track {
|
|
@@ -827,7 +713,4 @@ export default {
|
|
|
827
713
|
box-shadow: none !important;
|
|
828
714
|
}
|
|
829
715
|
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
716
|
</style>
|