@abi-software/map-side-bar 2.6.2-beta.0 → 2.6.3-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 +3639 -3763
- package/dist/map-side-bar.umd.cjs +32 -32
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/algolia/utils.js +9 -2
- package/src/components/ConnectivityInfo.vue +72 -166
- package/src/components/SearchFilters.vue +7 -3
- package/src/components/SearchHistory.vue +1 -0
- package/src/components/SideBar.vue +0 -4
- package/src/components.d.ts +0 -1
- package/src/exampleConnectivityInput.js +1 -2
package/package.json
CHANGED
package/src/algolia/utils.js
CHANGED
|
@@ -40,6 +40,12 @@ export const facetPropPathMapping = [
|
|
|
40
40
|
facetPropPath: 'attributes.subject.ageCategory.value',
|
|
41
41
|
facetSubpropPath: 'attributes.subject.ageCategory.subcategory.name'
|
|
42
42
|
},
|
|
43
|
+
{
|
|
44
|
+
label: 'Funding Program',
|
|
45
|
+
id: 'pennsieve.organization',
|
|
46
|
+
facetPropPath: 'pennsieve.organization.name',
|
|
47
|
+
facetSubpropPath: 'pennsieve.organization.subcategory.name'
|
|
48
|
+
},
|
|
43
49
|
]
|
|
44
50
|
|
|
45
51
|
// Same as above, but these show on the sidebar filters
|
|
@@ -48,6 +54,7 @@ export const shownFilters = {
|
|
|
48
54
|
'organisms.primary.species.name' : 'Species',
|
|
49
55
|
'attributes.subject.sex.value' : 'Sex',
|
|
50
56
|
'attributes.subject.ageCategory.value' : 'Age Categories',
|
|
57
|
+
'pennsieve.organization.name' : 'Funding Program',
|
|
51
58
|
'item.types.name' : 'Data type',
|
|
52
59
|
}
|
|
53
60
|
|
|
@@ -60,9 +67,9 @@ export function getFilters(selectedFacetArray=undefined) {
|
|
|
60
67
|
return 'NOT item.published.status:embargo'
|
|
61
68
|
}
|
|
62
69
|
|
|
63
|
-
// Switch the 'term' attribute to 'label' if 'label' does not exist
|
|
70
|
+
// Switch the 'term' attribute to 'label' if 'label' does not exist
|
|
64
71
|
selectedFacetArray.forEach(f=>f.label=f.facet)
|
|
65
|
-
|
|
72
|
+
|
|
66
73
|
|
|
67
74
|
let facets = removeShowAllFacets(selectedFacetArray)
|
|
68
75
|
|
|
@@ -22,7 +22,13 @@
|
|
|
22
22
|
</el-popover>
|
|
23
23
|
</template>
|
|
24
24
|
</div>
|
|
25
|
-
<div
|
|
25
|
+
<div
|
|
26
|
+
v-if="
|
|
27
|
+
entry.provenanceTaxonomyLabel &&
|
|
28
|
+
entry.provenanceTaxonomyLabel.length > 0
|
|
29
|
+
"
|
|
30
|
+
class="subtitle"
|
|
31
|
+
>
|
|
26
32
|
{{ provSpeciesDescription }}
|
|
27
33
|
</div>
|
|
28
34
|
</div>
|
|
@@ -52,39 +58,7 @@
|
|
|
52
58
|
</div>
|
|
53
59
|
</div>
|
|
54
60
|
|
|
55
|
-
<div class="content-container
|
|
56
|
-
<div class="block attribute-title-container">
|
|
57
|
-
<span class="attribute-title">Neuron Connection</span>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="block">
|
|
60
|
-
<el-button
|
|
61
|
-
v-if="hasOrigins"
|
|
62
|
-
class="button"
|
|
63
|
-
type="primary"
|
|
64
|
-
@click="showNeuronConnection('origins')"
|
|
65
|
-
>
|
|
66
|
-
Origins
|
|
67
|
-
</el-button>
|
|
68
|
-
<el-button
|
|
69
|
-
v-if="hasComponents"
|
|
70
|
-
class="button"
|
|
71
|
-
type="primary"
|
|
72
|
-
@click="showNeuronConnection('components')"
|
|
73
|
-
>
|
|
74
|
-
Components
|
|
75
|
-
</el-button>
|
|
76
|
-
<el-button
|
|
77
|
-
v-if="hasDestinations"
|
|
78
|
-
class="button"
|
|
79
|
-
type="primary"
|
|
80
|
-
@click="showNeuronConnection('destinations')"
|
|
81
|
-
>
|
|
82
|
-
Destinations
|
|
83
|
-
</el-button>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
|
|
87
|
-
<div class="content-container population-display" v-if="entry.neuronCuration">
|
|
61
|
+
<div class="content-container population-display">
|
|
88
62
|
<div class="block attribute-title-container">
|
|
89
63
|
<span class="attribute-title">Population Display</span>
|
|
90
64
|
</div>
|
|
@@ -106,7 +80,7 @@
|
|
|
106
80
|
|
|
107
81
|
<div class="content-container content-container-connectivity" v-show="activeView === 'listView'">
|
|
108
82
|
{{ entry.paths }}
|
|
109
|
-
<div v-if="
|
|
83
|
+
<div v-if="entry.origins && entry.origins.length > 0" class="block">
|
|
110
84
|
<div class="attribute-title-container">
|
|
111
85
|
<span class="attribute-title">Origin</span>
|
|
112
86
|
<el-popover
|
|
@@ -121,6 +95,7 @@
|
|
|
121
95
|
<span style="word-break: keep-all">
|
|
122
96
|
<i>Origin</i> {{ originDescription }}
|
|
123
97
|
</span>
|
|
98
|
+
|
|
124
99
|
</el-popover>
|
|
125
100
|
</div>
|
|
126
101
|
<div
|
|
@@ -128,23 +103,16 @@
|
|
|
128
103
|
class="attribute-content"
|
|
129
104
|
:origin-item-label="origin"
|
|
130
105
|
:key="origin"
|
|
106
|
+
@mouseenter="toggleConnectivityTooltip(origin, {show: true})"
|
|
107
|
+
@mouseleave="toggleConnectivityTooltip(origin, {show: false})"
|
|
131
108
|
>
|
|
132
|
-
|
|
133
|
-
@mouseenter="toggleConnectivityTooltip(origin, {show: true})"
|
|
134
|
-
@mouseleave="toggleConnectivityTooltip(origin, {show: false})"
|
|
135
|
-
>
|
|
136
|
-
{{ capitalise(origin) }}
|
|
137
|
-
</span>
|
|
138
|
-
<el-icon
|
|
139
|
-
|
|
140
|
-
class="neuron-connection-icon"
|
|
141
|
-
@click="showNeuronConnection('origins', origin)"
|
|
142
|
-
>
|
|
143
|
-
<el-icon-connection />
|
|
144
|
-
</el-icon>
|
|
109
|
+
{{ capitalise(origin) }}
|
|
145
110
|
</div>
|
|
146
111
|
<el-button
|
|
147
|
-
v-show="
|
|
112
|
+
v-show="
|
|
113
|
+
entry.originsWithDatasets && entry.originsWithDatasets.length > 0 &&
|
|
114
|
+
shouldShowExploreButton(entry.originsWithDatasets)
|
|
115
|
+
"
|
|
148
116
|
class="button"
|
|
149
117
|
id="open-dendrites-button"
|
|
150
118
|
@click="openDendrites"
|
|
@@ -152,7 +120,10 @@
|
|
|
152
120
|
Explore origin data
|
|
153
121
|
</el-button>
|
|
154
122
|
</div>
|
|
155
|
-
<div
|
|
123
|
+
<div
|
|
124
|
+
v-if="entry.components && entry.components.length > 0"
|
|
125
|
+
class="block"
|
|
126
|
+
>
|
|
156
127
|
<div class="attribute-title-container">
|
|
157
128
|
<div class="attribute-title">Components</div>
|
|
158
129
|
</div>
|
|
@@ -161,23 +132,16 @@
|
|
|
161
132
|
class="attribute-content"
|
|
162
133
|
:component-item-label="component"
|
|
163
134
|
:key="component"
|
|
135
|
+
@mouseenter="toggleConnectivityTooltip(component, {show: true})"
|
|
136
|
+
@mouseleave="toggleConnectivityTooltip(component, {show: false})"
|
|
164
137
|
>
|
|
165
|
-
|
|
166
|
-
@mouseenter="toggleConnectivityTooltip(component, {show: true})"
|
|
167
|
-
@mouseleave="toggleConnectivityTooltip(component, {show: false})"
|
|
168
|
-
>
|
|
169
|
-
{{ capitalise(component) }}
|
|
170
|
-
</span>
|
|
171
|
-
<el-icon
|
|
172
|
-
|
|
173
|
-
class="neuron-connection-icon"
|
|
174
|
-
@click="showNeuronConnection('components', component)"
|
|
175
|
-
>
|
|
176
|
-
<el-icon-connection />
|
|
177
|
-
</el-icon>
|
|
138
|
+
{{ capitalise(component) }}
|
|
178
139
|
</div>
|
|
179
140
|
</div>
|
|
180
|
-
<div
|
|
141
|
+
<div
|
|
142
|
+
v-if="entry.destinations && entry.destinations.length > 0"
|
|
143
|
+
class="block"
|
|
144
|
+
>
|
|
181
145
|
<div class="attribute-title-container">
|
|
182
146
|
<span class="attribute-title">Destination</span>
|
|
183
147
|
<el-popover
|
|
@@ -199,28 +163,35 @@
|
|
|
199
163
|
class="attribute-content"
|
|
200
164
|
:destination-item-label="destination"
|
|
201
165
|
:key="destination"
|
|
166
|
+
@mouseenter="toggleConnectivityTooltip(destination, {show: true})"
|
|
167
|
+
@mouseleave="toggleConnectivityTooltip(destination, {show: false})"
|
|
202
168
|
>
|
|
203
|
-
|
|
204
|
-
@mouseenter="toggleConnectivityTooltip(destination, {show: true})"
|
|
205
|
-
@mouseleave="toggleConnectivityTooltip(destination, {show: false})"
|
|
206
|
-
>
|
|
207
|
-
{{ capitalise(destination) }}
|
|
208
|
-
</span>
|
|
209
|
-
<el-icon
|
|
210
|
-
|
|
211
|
-
class="neuron-connection-icon"
|
|
212
|
-
@click="showNeuronConnection('destinations', destination)"
|
|
213
|
-
>
|
|
214
|
-
<el-icon-connection />
|
|
215
|
-
</el-icon>
|
|
169
|
+
{{ capitalise(destination) }}
|
|
216
170
|
</div>
|
|
217
|
-
<el-button
|
|
171
|
+
<el-button
|
|
172
|
+
v-show="
|
|
173
|
+
entry.destinationsWithDatasets &&
|
|
174
|
+
entry.destinationsWithDatasets.length > 0 &&
|
|
175
|
+
shouldShowExploreButton(entry.destinationsWithDatasets)
|
|
176
|
+
"
|
|
177
|
+
class="button"
|
|
178
|
+
@click="openAxons"
|
|
218
179
|
>
|
|
219
180
|
Explore destination data
|
|
220
181
|
</el-button>
|
|
221
182
|
</div>
|
|
222
|
-
<div
|
|
223
|
-
|
|
183
|
+
<div
|
|
184
|
+
v-show="
|
|
185
|
+
entry.componentsWithDatasets &&
|
|
186
|
+
entry.componentsWithDatasets.length > 0 &&
|
|
187
|
+
shouldShowExploreButton(entry.componentsWithDatasets)
|
|
188
|
+
"
|
|
189
|
+
class="block"
|
|
190
|
+
>
|
|
191
|
+
<el-button
|
|
192
|
+
class="button"
|
|
193
|
+
@click="openAll"
|
|
194
|
+
>
|
|
224
195
|
Search for data on components
|
|
225
196
|
</el-button>
|
|
226
197
|
</div>
|
|
@@ -257,7 +228,6 @@ import {
|
|
|
257
228
|
ArrowUp as ElIconArrowUp,
|
|
258
229
|
ArrowDown as ElIconArrowDown,
|
|
259
230
|
Warning as ElIconWarning,
|
|
260
|
-
Connection as ElIconConnection,
|
|
261
231
|
} from '@element-plus/icons-vue'
|
|
262
232
|
/* eslint-disable no-alert, no-console */
|
|
263
233
|
import {
|
|
@@ -269,7 +239,8 @@ import {
|
|
|
269
239
|
import EventBus from './EventBus.js'
|
|
270
240
|
import {
|
|
271
241
|
CopyToClipboard,
|
|
272
|
-
ConnectivityGraph
|
|
242
|
+
ConnectivityGraph,
|
|
243
|
+
ExternalResourceCard,
|
|
273
244
|
} from '@abi-software/map-utilities';
|
|
274
245
|
import '@abi-software/map-utilities/dist/style.css';
|
|
275
246
|
|
|
@@ -295,6 +266,7 @@ export default {
|
|
|
295
266
|
ElIconArrowUp,
|
|
296
267
|
ElIconArrowDown,
|
|
297
268
|
ElIconWarning,
|
|
269
|
+
ExternalResourceCard,
|
|
298
270
|
CopyToClipboard,
|
|
299
271
|
ConnectivityGraph,
|
|
300
272
|
},
|
|
@@ -353,45 +325,6 @@ export default {
|
|
|
353
325
|
},
|
|
354
326
|
},
|
|
355
327
|
computed: {
|
|
356
|
-
hasProvenanceTaxonomyLabel: function () {
|
|
357
|
-
return (
|
|
358
|
-
this.entry.provenanceTaxonomyLabel &&
|
|
359
|
-
this.entry.provenanceTaxonomyLabel.length > 0
|
|
360
|
-
);
|
|
361
|
-
},
|
|
362
|
-
hasOrigins: function () {
|
|
363
|
-
return this.entry.origins && this.entry.origins.length > 0;
|
|
364
|
-
},
|
|
365
|
-
hasOriginsWithDatasets: function () {
|
|
366
|
-
return (
|
|
367
|
-
this.entry.originsWithDatasets &&
|
|
368
|
-
this.entry.originsWithDatasets.length > 0 &&
|
|
369
|
-
this.shouldShowExploreButton(this.entry.originsWithDatasets)
|
|
370
|
-
);
|
|
371
|
-
},
|
|
372
|
-
hasComponents: function () {
|
|
373
|
-
return this.entry.components && this.entry.components.length > 0;
|
|
374
|
-
},
|
|
375
|
-
hasComponentsWithDatasets: function () {
|
|
376
|
-
return (
|
|
377
|
-
this.entry.componentsWithDatasets &&
|
|
378
|
-
this.entry.componentsWithDatasets.length > 0 &&
|
|
379
|
-
this.shouldShowExploreButton(this.entry.componentsWithDatasets)
|
|
380
|
-
);
|
|
381
|
-
},
|
|
382
|
-
hasDestinations: function () {
|
|
383
|
-
return this.entry.destinations && this.entry.destinations.length > 0;
|
|
384
|
-
},
|
|
385
|
-
hasDestinationsWithDatasets: function () {
|
|
386
|
-
return (
|
|
387
|
-
this.entry.destinationsWithDatasets &&
|
|
388
|
-
this.entry.destinationsWithDatasets.length > 0 &&
|
|
389
|
-
this.shouldShowExploreButton(this.entry.destinationsWithDatasets)
|
|
390
|
-
);
|
|
391
|
-
},
|
|
392
|
-
updatedCopyContent: function () {
|
|
393
|
-
return this.getUpdateCopyContent();
|
|
394
|
-
},
|
|
395
328
|
resources: function () {
|
|
396
329
|
let resources = [];
|
|
397
330
|
if (this.entry && this.entry.hyperlinks) {
|
|
@@ -421,13 +354,6 @@ export default {
|
|
|
421
354
|
},
|
|
422
355
|
},
|
|
423
356
|
methods: {
|
|
424
|
-
showNeuronConnection: function (type, label = undefined) {
|
|
425
|
-
const data = label ? this.findConnectivityDatasets(label) : []
|
|
426
|
-
this.$emit('neuron-connection-change', {
|
|
427
|
-
type: type,
|
|
428
|
-
data: data
|
|
429
|
-
});
|
|
430
|
-
},
|
|
431
357
|
titleCase: function (title) {
|
|
432
358
|
return titleCase(title)
|
|
433
359
|
},
|
|
@@ -591,29 +517,29 @@ export default {
|
|
|
591
517
|
|
|
592
518
|
return contentArray.join('\n\n<br>');
|
|
593
519
|
},
|
|
594
|
-
|
|
520
|
+
toggleConnectivityTooltip: function (name, option) {
|
|
595
521
|
const allWithDatasets = [
|
|
596
522
|
...this.entry.componentsWithDatasets,
|
|
597
523
|
...this.entry.destinationsWithDatasets,
|
|
598
524
|
...this.entry.originsWithDatasets,
|
|
599
525
|
];
|
|
600
|
-
const names =
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
526
|
+
const names = name.split(','); // some features have more than one value
|
|
527
|
+
const data = [];
|
|
528
|
+
if (option.show) {
|
|
529
|
+
names.forEach((n) => {
|
|
530
|
+
const foundData = allWithDatasets.find((a) =>
|
|
531
|
+
a.name.toLowerCase().trim() === n.toLowerCase().trim()
|
|
532
|
+
);
|
|
533
|
+
|
|
534
|
+
if (foundData) {
|
|
535
|
+
data.push({
|
|
536
|
+
id: foundData.id,
|
|
537
|
+
label: foundData.name
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
|
|
617
543
|
// type: to show error only for click event
|
|
618
544
|
this.$emit('connectivity-component-click', data);
|
|
619
545
|
},
|
|
@@ -825,8 +751,6 @@ export default {
|
|
|
825
751
|
}
|
|
826
752
|
|
|
827
753
|
.attribute-content {
|
|
828
|
-
display: flex;
|
|
829
|
-
justify-content: space-between;
|
|
830
754
|
font-size: 14px;
|
|
831
755
|
font-weight: 500;
|
|
832
756
|
transition: color 0.25s ease;
|
|
@@ -852,11 +776,6 @@ export default {
|
|
|
852
776
|
&:last-of-type {
|
|
853
777
|
margin-bottom: 0.5em;
|
|
854
778
|
}
|
|
855
|
-
|
|
856
|
-
.neuron-connection-icon {
|
|
857
|
-
padding: 4px;
|
|
858
|
-
cursor: pointer;
|
|
859
|
-
}
|
|
860
779
|
}
|
|
861
780
|
|
|
862
781
|
.popover-container {
|
|
@@ -922,19 +841,6 @@ export default {
|
|
|
922
841
|
}
|
|
923
842
|
}
|
|
924
843
|
|
|
925
|
-
.neuron-connection-button {
|
|
926
|
-
display: flex;
|
|
927
|
-
flex: 1 1 auto !important;
|
|
928
|
-
flex-direction: row !important;
|
|
929
|
-
align-items: center;
|
|
930
|
-
justify-content: space-between;
|
|
931
|
-
|
|
932
|
-
.el-button + .el-button {
|
|
933
|
-
margin-top: 0 !important;
|
|
934
|
-
margin-left: 10px !important;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
|
|
938
844
|
.population-display {
|
|
939
845
|
display: flex;
|
|
940
846
|
flex: 1 1 auto !important;
|
|
@@ -241,9 +241,12 @@ export default {
|
|
|
241
241
|
|
|
242
242
|
// populate second level of options
|
|
243
243
|
this.options[i].children.forEach((facetItem, j) => {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
// Format labels except funding program
|
|
245
|
+
if (this.options[i].children[j].facetPropPath !== 'pennsieve.organization.name') {
|
|
246
|
+
this.options[i].children[j].label = convertReadableLabel(
|
|
247
|
+
facetItem.label
|
|
248
|
+
)
|
|
249
|
+
}
|
|
247
250
|
this.options[i].children[j].value =
|
|
248
251
|
this.createCascaderItemValue(facet.label, facetItem.label)
|
|
249
252
|
if (
|
|
@@ -811,6 +814,7 @@ export default {
|
|
|
811
814
|
this.setCascader(this.entry.filterFacets)
|
|
812
815
|
this.cssMods()
|
|
813
816
|
this.$emit('cascaderReady')
|
|
817
|
+
this.replaceCascader();
|
|
814
818
|
})
|
|
815
819
|
},
|
|
816
820
|
}
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
:ref="'connectivityTab_' + tab.id"
|
|
40
40
|
@show-connectivity="showConnectivity"
|
|
41
41
|
@connectivity-component-click="onConnectivityComponentClick"
|
|
42
|
-
@neuron-connection-change="showNeuronConnection"
|
|
43
42
|
/>
|
|
44
43
|
</template>
|
|
45
44
|
<template v-else-if="tab.type === 'annotation'">
|
|
@@ -196,9 +195,6 @@ export default {
|
|
|
196
195
|
onConnectivityComponentClick: function (data) {
|
|
197
196
|
this.$emit('connectivity-component-click', data);
|
|
198
197
|
},
|
|
199
|
-
showNeuronConnection: function (data) {
|
|
200
|
-
this.$emit('neuron-connection-change', data);
|
|
201
|
-
},
|
|
202
198
|
/**
|
|
203
199
|
* This event is emitted when the search filters are changed.
|
|
204
200
|
* @arg `obj` {data, id}
|
package/src/components.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ declare module 'vue' {
|
|
|
23
23
|
ElIconArrowDown: typeof import('@element-plus/icons-vue')['ArrowDown']
|
|
24
24
|
ElIconArrowLeft: typeof import('@element-plus/icons-vue')['ArrowLeft']
|
|
25
25
|
ElIconArrowRight: typeof import('@element-plus/icons-vue')['ArrowRight']
|
|
26
|
-
ElIconConnection: typeof import('@element-plus/icons-vue')['Connection']
|
|
27
26
|
ElIconDelete: typeof import('@element-plus/icons-vue')['Delete']
|
|
28
27
|
ElIconLocation: typeof import('@element-plus/icons-vue')['Location']
|
|
29
28
|
ElIconWarning: typeof import('@element-plus/icons-vue')['Warning']
|