@abi-software/map-side-bar 2.5.3-beta.18 → 2.5.3-beta.19
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 +8338 -9087
- package/dist/map-side-bar.umd.cjs +61 -61
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/ConnectivityInfo.vue +165 -71
- package/src/components/SearchFilters.vue +2 -20
- package/src/components/SearchHistory.vue +87 -537
- package/src/components/SideBar.vue +4 -0
- package/src/components/SidebarContent.vue +22 -51
- package/src/components.d.ts +1 -5
- package/src/exampleConnectivityInput.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/map-side-bar",
|
|
3
|
-
"version": "2.5.3-beta.
|
|
3
|
+
"version": "2.5.3-beta.19",
|
|
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.2.2-beta.
|
|
42
|
+
"@abi-software/map-utilities": "^1.2.2-beta.6",
|
|
43
43
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
44
44
|
"@element-plus/icons-vue": "^2.3.1",
|
|
45
45
|
"algoliasearch": "^4.10.5",
|
|
@@ -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 {
|
|
@@ -240,7 +270,6 @@ import EventBus from './EventBus.js'
|
|
|
240
270
|
import {
|
|
241
271
|
CopyToClipboard,
|
|
242
272
|
ConnectivityGraph,
|
|
243
|
-
ExternalResourceCard,
|
|
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;
|
|
@@ -174,7 +174,6 @@ export default {
|
|
|
174
174
|
showFiltersText: true,
|
|
175
175
|
cascadeSelected: [],
|
|
176
176
|
cascadeSelectedWithBoolean: [],
|
|
177
|
-
filterTimeout: null,
|
|
178
177
|
numberShown: 10,
|
|
179
178
|
filters: [],
|
|
180
179
|
facets: ['Species', 'Gender', 'Organ', 'Datasets'],
|
|
@@ -477,25 +476,10 @@ export default {
|
|
|
477
476
|
}
|
|
478
477
|
})
|
|
479
478
|
|
|
480
|
-
// if all checkboxes are checked
|
|
481
|
-
// there has no filter values
|
|
482
|
-
const filtersLength = filters.filter((item) => item.facet !== 'Show all');
|
|
483
|
-
if (!filtersLength.length) {
|
|
484
|
-
filters = [];
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
// timeout: add delay for filter checkboxes
|
|
488
|
-
if (this.filterTimeout) {
|
|
489
|
-
clearTimeout(this.filterTimeout);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
479
|
this.$emit('loading', true) // let sidebarcontent wait for the requests
|
|
480
|
+
this.$emit('filterResults', filters) // emit filters for apps above sidebar
|
|
493
481
|
this.setCascader(filterKeys) //update our cascader v-model if we modified the event
|
|
494
|
-
|
|
495
|
-
this.filterTimeout = setTimeout(() => {
|
|
496
|
-
this.$emit('filterResults', filters) // emit filters for apps above sidebar
|
|
497
|
-
this.cssMods() // update css for the cascader
|
|
498
|
-
}, 600);
|
|
482
|
+
this.cssMods() // update css for the cascader
|
|
499
483
|
}
|
|
500
484
|
},
|
|
501
485
|
//this fucntion is needed as we previously stored booleans in the array of event that
|
|
@@ -1013,8 +997,6 @@ export default {
|
|
|
1013
997
|
|
|
1014
998
|
.sidebar-cascader-popper .el-checkbox__input.is-checked .el-checkbox__inner,
|
|
1015
999
|
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
|
|
1016
|
-
--el-checkbox-checked-bg-color: #{$app-primary-color};
|
|
1017
|
-
--el-checkbox-checked-input-border-color: #{$app-primary-color};
|
|
1018
1000
|
background-color: $app-primary-color;
|
|
1019
1001
|
border-color: $app-primary-color;
|
|
1020
1002
|
}
|