@abi-software/map-side-bar 2.6.1 → 2.6.2-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 +3760 -3630
- package/dist/map-side-bar.umd.cjs +32 -32
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ConnectivityInfo.vue +166 -72
- package/src/components/SearchFilters.vue +1 -6
- package/src/components/SearchHistory.vue +1 -0
- package/src/components/SideBar.vue +4 -0
- package/src/components.d.ts +1 -0
- package/src/exampleConnectivityInput.js +2 -1
package/package.json
CHANGED
|
@@ -22,13 +22,7 @@
|
|
|
22
22
|
</el-popover>
|
|
23
23
|
</template>
|
|
24
24
|
</div>
|
|
25
|
-
<div
|
|
26
|
-
v-if="
|
|
27
|
-
entry.provenanceTaxonomyLabel &&
|
|
28
|
-
entry.provenanceTaxonomyLabel.length > 0
|
|
29
|
-
"
|
|
30
|
-
class="subtitle"
|
|
31
|
-
>
|
|
25
|
+
<div v-if="hasProvenanceTaxonomyLabel" class="subtitle">
|
|
32
26
|
{{ provSpeciesDescription }}
|
|
33
27
|
</div>
|
|
34
28
|
</div>
|
|
@@ -58,7 +52,39 @@
|
|
|
58
52
|
</div>
|
|
59
53
|
</div>
|
|
60
54
|
|
|
61
|
-
<div class="content-container
|
|
55
|
+
<div class="content-container neuron-connection-button" v-if="entry.neuronCuration">
|
|
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">
|
|
62
88
|
<div class="block attribute-title-container">
|
|
63
89
|
<span class="attribute-title">Population Display</span>
|
|
64
90
|
</div>
|
|
@@ -80,7 +106,7 @@
|
|
|
80
106
|
|
|
81
107
|
<div class="content-container content-container-connectivity" v-show="activeView === 'listView'">
|
|
82
108
|
{{ entry.paths }}
|
|
83
|
-
<div v-if="
|
|
109
|
+
<div v-if="hasOrigins" class="block">
|
|
84
110
|
<div class="attribute-title-container">
|
|
85
111
|
<span class="attribute-title">Origin</span>
|
|
86
112
|
<el-popover
|
|
@@ -95,7 +121,6 @@
|
|
|
95
121
|
<span style="word-break: keep-all">
|
|
96
122
|
<i>Origin</i> {{ originDescription }}
|
|
97
123
|
</span>
|
|
98
|
-
|
|
99
124
|
</el-popover>
|
|
100
125
|
</div>
|
|
101
126
|
<div
|
|
@@ -103,16 +128,23 @@
|
|
|
103
128
|
class="attribute-content"
|
|
104
129
|
:origin-item-label="origin"
|
|
105
130
|
:key="origin"
|
|
106
|
-
@mouseenter="toggleConnectivityTooltip(origin, {show: true})"
|
|
107
|
-
@mouseleave="toggleConnectivityTooltip(origin, {show: false})"
|
|
108
131
|
>
|
|
109
|
-
|
|
132
|
+
<span
|
|
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>
|
|
110
145
|
</div>
|
|
111
146
|
<el-button
|
|
112
|
-
v-show="
|
|
113
|
-
entry.originsWithDatasets && entry.originsWithDatasets.length > 0 &&
|
|
114
|
-
shouldShowExploreButton(entry.originsWithDatasets)
|
|
115
|
-
"
|
|
147
|
+
v-show="hasOriginsWithDatasets"
|
|
116
148
|
class="button"
|
|
117
149
|
id="open-dendrites-button"
|
|
118
150
|
@click="openDendrites"
|
|
@@ -120,10 +152,7 @@
|
|
|
120
152
|
Explore origin data
|
|
121
153
|
</el-button>
|
|
122
154
|
</div>
|
|
123
|
-
<div
|
|
124
|
-
v-if="entry.components && entry.components.length > 0"
|
|
125
|
-
class="block"
|
|
126
|
-
>
|
|
155
|
+
<div v-if="hasComponents" class="block">
|
|
127
156
|
<div class="attribute-title-container">
|
|
128
157
|
<div class="attribute-title">Components</div>
|
|
129
158
|
</div>
|
|
@@ -132,16 +161,23 @@
|
|
|
132
161
|
class="attribute-content"
|
|
133
162
|
:component-item-label="component"
|
|
134
163
|
:key="component"
|
|
135
|
-
@mouseenter="toggleConnectivityTooltip(component, {show: true})"
|
|
136
|
-
@mouseleave="toggleConnectivityTooltip(component, {show: false})"
|
|
137
164
|
>
|
|
138
|
-
|
|
165
|
+
<span
|
|
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>
|
|
139
178
|
</div>
|
|
140
179
|
</div>
|
|
141
|
-
<div
|
|
142
|
-
v-if="entry.destinations && entry.destinations.length > 0"
|
|
143
|
-
class="block"
|
|
144
|
-
>
|
|
180
|
+
<div v-if="hasDestinations" class="block">
|
|
145
181
|
<div class="attribute-title-container">
|
|
146
182
|
<span class="attribute-title">Destination</span>
|
|
147
183
|
<el-popover
|
|
@@ -163,35 +199,28 @@
|
|
|
163
199
|
class="attribute-content"
|
|
164
200
|
:destination-item-label="destination"
|
|
165
201
|
:key="destination"
|
|
166
|
-
@mouseenter="toggleConnectivityTooltip(destination, {show: true})"
|
|
167
|
-
@mouseleave="toggleConnectivityTooltip(destination, {show: false})"
|
|
168
202
|
>
|
|
169
|
-
|
|
203
|
+
<span
|
|
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>
|
|
170
216
|
</div>
|
|
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"
|
|
217
|
+
<el-button v-show="hasDestinationsWithDatasets" class="button" @click="openAxons"
|
|
179
218
|
>
|
|
180
219
|
Explore destination data
|
|
181
220
|
</el-button>
|
|
182
221
|
</div>
|
|
183
|
-
<div
|
|
184
|
-
|
|
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
|
-
>
|
|
222
|
+
<div v-show="hasComponentsWithDatasets" class="block">
|
|
223
|
+
<el-button class="button" @click="openAll">
|
|
195
224
|
Search for data on components
|
|
196
225
|
</el-button>
|
|
197
226
|
</div>
|
|
@@ -228,6 +257,7 @@ import {
|
|
|
228
257
|
ArrowUp as ElIconArrowUp,
|
|
229
258
|
ArrowDown as ElIconArrowDown,
|
|
230
259
|
Warning as ElIconWarning,
|
|
260
|
+
Connection as ElIconConnection,
|
|
231
261
|
} from '@element-plus/icons-vue'
|
|
232
262
|
/* eslint-disable no-alert, no-console */
|
|
233
263
|
import {
|
|
@@ -239,8 +269,7 @@ import {
|
|
|
239
269
|
import EventBus from './EventBus.js'
|
|
240
270
|
import {
|
|
241
271
|
CopyToClipboard,
|
|
242
|
-
ConnectivityGraph
|
|
243
|
-
ExternalResourceCard,
|
|
272
|
+
ConnectivityGraph
|
|
244
273
|
} from '@abi-software/map-utilities';
|
|
245
274
|
import '@abi-software/map-utilities/dist/style.css';
|
|
246
275
|
|
|
@@ -266,7 +295,6 @@ export default {
|
|
|
266
295
|
ElIconArrowUp,
|
|
267
296
|
ElIconArrowDown,
|
|
268
297
|
ElIconWarning,
|
|
269
|
-
ExternalResourceCard,
|
|
270
298
|
CopyToClipboard,
|
|
271
299
|
ConnectivityGraph,
|
|
272
300
|
},
|
|
@@ -325,6 +353,45 @@ export default {
|
|
|
325
353
|
},
|
|
326
354
|
},
|
|
327
355
|
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
|
+
},
|
|
328
395
|
resources: function () {
|
|
329
396
|
let resources = [];
|
|
330
397
|
if (this.entry && this.entry.hyperlinks) {
|
|
@@ -354,6 +421,13 @@ export default {
|
|
|
354
421
|
},
|
|
355
422
|
},
|
|
356
423
|
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
|
+
},
|
|
357
431
|
titleCase: function (title) {
|
|
358
432
|
return titleCase(title)
|
|
359
433
|
},
|
|
@@ -517,29 +591,29 @@ export default {
|
|
|
517
591
|
|
|
518
592
|
return contentArray.join('\n\n<br>');
|
|
519
593
|
},
|
|
520
|
-
|
|
594
|
+
findConnectivityDatasets: function (label) {
|
|
521
595
|
const allWithDatasets = [
|
|
522
596
|
...this.entry.componentsWithDatasets,
|
|
523
597
|
...this.entry.destinationsWithDatasets,
|
|
524
598
|
...this.entry.originsWithDatasets,
|
|
525
599
|
];
|
|
526
|
-
const names =
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
600
|
+
const names = label.split(','); // some features have more than one value
|
|
601
|
+
let data = [];
|
|
602
|
+
names.forEach((n) => {
|
|
603
|
+
const foundData = allWithDatasets.find((a) =>
|
|
604
|
+
a.name.toLowerCase().trim() === n.toLowerCase().trim()
|
|
605
|
+
);
|
|
606
|
+
if (foundData) {
|
|
607
|
+
data.push({
|
|
608
|
+
id: foundData.id,
|
|
609
|
+
label: foundData.name
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
return data
|
|
614
|
+
},
|
|
615
|
+
toggleConnectivityTooltip: function (label, option) {
|
|
616
|
+
const data = option.show ? this.findConnectivityDatasets(label) : []
|
|
543
617
|
// type: to show error only for click event
|
|
544
618
|
this.$emit('connectivity-component-click', data);
|
|
545
619
|
},
|
|
@@ -751,6 +825,8 @@ export default {
|
|
|
751
825
|
}
|
|
752
826
|
|
|
753
827
|
.attribute-content {
|
|
828
|
+
display: flex;
|
|
829
|
+
justify-content: space-between;
|
|
754
830
|
font-size: 14px;
|
|
755
831
|
font-weight: 500;
|
|
756
832
|
transition: color 0.25s ease;
|
|
@@ -776,6 +852,11 @@ export default {
|
|
|
776
852
|
&:last-of-type {
|
|
777
853
|
margin-bottom: 0.5em;
|
|
778
854
|
}
|
|
855
|
+
|
|
856
|
+
.neuron-connection-icon {
|
|
857
|
+
padding: 4px;
|
|
858
|
+
cursor: pointer;
|
|
859
|
+
}
|
|
779
860
|
}
|
|
780
861
|
|
|
781
862
|
.popover-container {
|
|
@@ -841,6 +922,19 @@ export default {
|
|
|
841
922
|
}
|
|
842
923
|
}
|
|
843
924
|
|
|
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
|
+
|
|
844
938
|
.population-display {
|
|
845
939
|
display: flex;
|
|
846
940
|
flex: 1 1 auto !important;
|
|
@@ -998,14 +998,9 @@ export default {
|
|
|
998
998
|
border-color: $app-primary-color;
|
|
999
999
|
}
|
|
1000
1000
|
|
|
1001
|
-
.filter-help-popover {
|
|
1002
|
-
color: rgb(48, 49, 51);
|
|
1003
|
-
font-family: Asap;
|
|
1004
|
-
margin: 12px;
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
1001
|
.filter-help-popover,
|
|
1008
1002
|
.cascade-tags-popover {
|
|
1003
|
+
font-family: 'Asap', sans-serif;
|
|
1009
1004
|
background: #f3ecf6 !important;
|
|
1010
1005
|
border: 1px solid $app-primary-color !important;
|
|
1011
1006
|
border-radius: 4px !important;
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
:ref="'connectivityTab_' + tab.id"
|
|
40
40
|
@show-connectivity="showConnectivity"
|
|
41
41
|
@connectivity-component-click="onConnectivityComponentClick"
|
|
42
|
+
@neuron-connection-change="showNeuronConnection"
|
|
42
43
|
/>
|
|
43
44
|
</template>
|
|
44
45
|
<template v-else-if="tab.type === 'annotation'">
|
|
@@ -195,6 +196,9 @@ export default {
|
|
|
195
196
|
onConnectivityComponentClick: function (data) {
|
|
196
197
|
this.$emit('connectivity-component-click', data);
|
|
197
198
|
},
|
|
199
|
+
showNeuronConnection: function (data) {
|
|
200
|
+
this.$emit('neuron-connection-change', data);
|
|
201
|
+
},
|
|
198
202
|
/**
|
|
199
203
|
* This event is emitted when the search filters are changed.
|
|
200
204
|
* @arg `obj` {data, id}
|
package/src/components.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ 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']
|
|
26
27
|
ElIconDelete: typeof import('@element-plus/icons-vue')['Delete']
|
|
27
28
|
ElIconLocation: typeof import('@element-plus/icons-vue')['Location']
|
|
28
29
|
ElIconWarning: typeof import('@element-plus/icons-vue')['Warning']
|