@abi-software/flatmapvuer 1.1.3 → 1.2.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.
Files changed (41) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +120 -120
  3. package/cypress.config.js +23 -23
  4. package/dist/flatmapvuer.js +43580 -38546
  5. package/dist/flatmapvuer.umd.cjs +189 -181
  6. package/dist/index.html +17 -17
  7. package/dist/style.css +1 -1
  8. package/package.json +95 -95
  9. package/public/index.html +17 -17
  10. package/reporter-config.json +9 -9
  11. package/src/App.vue +379 -379
  12. package/src/assets/_variables.scss +43 -43
  13. package/src/assets/styles.scss +5 -5
  14. package/src/components/AnnotationTool.vue +501 -501
  15. package/src/components/ConnectionDialog.vue +134 -134
  16. package/src/components/DrawTool.vue +502 -502
  17. package/src/components/EventBus.js +3 -3
  18. package/src/components/ExternalResourceCard.vue +109 -109
  19. package/src/components/FlatmapVuer.vue +3515 -3455
  20. package/src/components/HelpModeDialog.vue +360 -360
  21. package/src/components/MultiFlatmapVuer.vue +814 -814
  22. package/src/components/ProvenancePopup.vue +530 -530
  23. package/src/components/SelectionsGroup.vue +363 -363
  24. package/src/components/Tooltip.vue +50 -50
  25. package/src/components/TreeControls.vue +236 -236
  26. package/src/components/index.js +8 -8
  27. package/src/components/legends/DynamicLegends.vue +106 -106
  28. package/src/components/legends/SvgLegends.vue +112 -112
  29. package/src/icons/flatmap-marker.js +9 -1
  30. package/src/icons/fonts/mapicon-species.svg +14 -14
  31. package/src/icons/fonts/mapicon-species.ttf +0 -0
  32. package/src/icons/fonts/mapicon-species.woff +0 -0
  33. package/src/icons/mapicon-species-style.css +42 -42
  34. package/src/icons/yellowstar.js +5 -5
  35. package/src/legends/legend.svg +25 -25
  36. package/src/main.js +19 -19
  37. package/src/services/flatmapQueries.js +475 -475
  38. package/src/store/index.js +23 -23
  39. package/vite.config.js +73 -73
  40. package/vite.static-build.js +12 -12
  41. package/vuese-generator.js +64 -64
@@ -1,530 +1,530 @@
1
- <template>
2
- <div v-if="entry" class="main" v-loading="loading">
3
- <div class="block" v-if="entry.title">
4
- <div class="title">{{ capitalise(entry.title) }}</div>
5
- <div
6
- v-if="
7
- entry.provenanceTaxonomyLabel &&
8
- entry.provenanceTaxonomyLabel.length > 0
9
- "
10
- class="subtitle"
11
- >
12
- {{ provSpeciesDescription }}
13
- </div>
14
- </div>
15
- <div class="block" v-else>
16
- <div class="title">{{ entry.featureId }}</div>
17
- </div>
18
- <div v-if="featuresAlert">
19
- <span class="attribute-title">Alert</span>
20
- <el-popover
21
- width="250"
22
- trigger="hover"
23
- :teleported="false"
24
- popper-class="popover-origin-help"
25
- >
26
- <template #reference>
27
- <el-icon class="info"><el-icon-warning /></el-icon>
28
- </template>
29
- <span style="word-break: keep-all">
30
- {{ featuresAlert }}
31
- </span>
32
- </el-popover>
33
- </div>
34
- <div v-show="showDetails" class="hide" id="hide-path-info" @click="showDetails = false">
35
- Hide path information
36
- <el-icon><el-icon-arrow-up /></el-icon>
37
- </div>
38
- <div v-show="!showDetails" class="hide" id="show-path-info" @click="showDetails = true">
39
- Show path information
40
- <el-icon><el-icon-arrow-down /></el-icon>
41
- </div>
42
- <transition name="slide-fade">
43
- <div v-show="showDetails" class="content-container scrollbar">
44
- {{ entry.paths }}
45
- <div v-if="entry.origins && entry.origins.length > 0" class="block">
46
- <div>
47
- <span class="attribute-title">Origin</span>
48
- <el-popover
49
- width="250"
50
- trigger="hover"
51
- :teleported="false"
52
- popper-class="popover-origin-help"
53
- >
54
- <template #reference>
55
- <el-icon class="info"><el-icon-warning /></el-icon>
56
- </template>
57
- <span style="word-break: keep-all">
58
- <i>Origin</i> {{ originDescription }}
59
- </span>
60
-
61
- </el-popover>
62
- </div>
63
- <div
64
- v-for="(origin, i) in entry.origins"
65
- class="attribute-content"
66
- :origin-item-label="origin"
67
- :key="origin"
68
- >
69
- {{ capitalise(origin) }}
70
- <div v-if="i != entry.origins.length - 1" class="seperator"></div>
71
- </div>
72
- <el-button
73
- v-show="
74
- entry.originsWithDatasets && entry.originsWithDatasets.length > 0
75
- "
76
- class="button"
77
- id="open-dendrites-button"
78
- @click="openDendrites"
79
- >
80
- Explore origin data
81
- </el-button>
82
- </div>
83
- <div
84
- v-if="entry.components && entry.components.length > 0"
85
- class="block"
86
- >
87
- <div class="attribute-title">Components</div>
88
- <div
89
- v-for="(component, i) in entry.components"
90
- class="attribute-content"
91
- :component-item-label="component"
92
- :key="component"
93
- >
94
- {{ capitalise(component) }}
95
- <div
96
- v-if="i != entry.components.length - 1"
97
- class="seperator"
98
- ></div>
99
- </div>
100
- </div>
101
- <div
102
- v-if="entry.destinations && entry.destinations.length > 0"
103
- class="block"
104
- >
105
- <div>
106
- <span class="attribute-title">Destination</span>
107
- <el-popover
108
- width="250"
109
- trigger="hover"
110
- :teleported="false"
111
- popper-class="popover-origin-help"
112
- >
113
- <template #reference>
114
- <el-icon class="info"><el-icon-warning /></el-icon>
115
- </template>
116
- <span style="word-break: keep-all">
117
- <i>Destination</i> is where the axons terminate
118
- </span>
119
- </el-popover>
120
- </div>
121
- <div
122
- v-for="(destination, i) in entry.destinations"
123
- class="attribute-content"
124
- :destination-item-label="destination"
125
- :key="destination"
126
- >
127
- {{ capitalise(destination) }}
128
- <div
129
- v-if="i != entry.destinations.length - 1"
130
- class="seperator"
131
- ></div>
132
- </div>
133
- <el-button
134
- v-show="
135
- entry.destinationsWithDatasets &&
136
- entry.destinationsWithDatasets.length > 0
137
- "
138
- class="button"
139
- @click="openAxons"
140
- >
141
- Explore destination data
142
- </el-button>
143
- </div>
144
-
145
- <el-button
146
- v-show="
147
- entry.componentsWithDatasets &&
148
- entry.componentsWithDatasets.length > 0
149
- "
150
- class="button"
151
- @click="openAll"
152
- >
153
- Search for data on components
154
- </el-button>
155
-
156
- <external-resource-card :resources="resources"></external-resource-card>
157
- </div>
158
- </transition>
159
- </div>
160
- </template>
161
-
162
- <script>
163
- import {
164
- ArrowUp as ElIconArrowUp,
165
- ArrowDown as ElIconArrowDown,
166
- Warning as ElIconWarning,
167
- } from '@element-plus/icons-vue'
168
- /* eslint-disable no-alert, no-console */
169
- import {
170
- ElButton as Button,
171
- ElContainer as Container,
172
- ElIcon as Icon,
173
- } from 'element-plus'
174
-
175
- import EventBus from './EventBus'
176
- import ExternalResourceCard from './ExternalResourceCard.vue'
177
-
178
- const titleCase = (str) => {
179
- return str.replace(/\w\S*/g, (t) => {
180
- return t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()
181
- })
182
- }
183
-
184
- const capitalise = function (str) {
185
- if (str) return str.charAt(0).toUpperCase() + str.slice(1)
186
- return ''
187
- }
188
-
189
- export default {
190
- name: 'ProvenancePopup',
191
- components: {
192
- Button,
193
- Container,
194
- Icon,
195
- ExternalResourceCard,
196
- ElIconArrowUp,
197
- ElIconArrowDown,
198
- ElIconWarning,
199
- },
200
- props: {
201
- entry: {
202
- type: Object,
203
- default: () => ({
204
- destinations: [],
205
- origins: [],
206
- components: [],
207
- destinationsWithDatasets: [],
208
- originsWithDatasets: [],
209
- componentsWithDatasets: [],
210
- resource: undefined,
211
- }),
212
- },
213
- },
214
- inject: ['getFeaturesAlert'],
215
- data: function () {
216
- return {
217
- controller: undefined,
218
- activeSpecies: undefined,
219
- pubmedSearchUrl: '',
220
- loading: false,
221
- showToolip: false,
222
- showDetails: false,
223
- originDescriptions: {
224
- motor: 'is the location of the initial cell body of the circuit',
225
- sensory: 'is the location of the initial cell body in the PNS circuit',
226
- },
227
- componentsWithDatasets: [],
228
- uberons: [{ id: undefined, name: undefined }],
229
- }
230
- },
231
- computed: {
232
- featuresAlert() {
233
- return this.getFeaturesAlert()
234
- },
235
- resources: function () {
236
- let resources = []
237
- if (this.entry && this.entry.hyperlinks) {
238
- resources = this.entry.hyperlinks
239
- }
240
- return resources
241
- },
242
- originDescription: function () {
243
- if (
244
- this.entry &&
245
- this.entry.title &&
246
- this.entry.title.toLowerCase().includes('motor')
247
- ) {
248
- return this.originDescriptions.motor
249
- } else {
250
- return this.originDescriptions.sensory
251
- }
252
- },
253
- provSpeciesDescription: function () {
254
- let text = 'Studied in'
255
- this.entry.provenanceTaxonomyLabel.forEach((label) => {
256
- text += ` ${label},`
257
- })
258
- text = text.slice(0, -1) // remove last comma
259
- text += ' species'
260
- return text
261
- },
262
- },
263
- methods: {
264
- titleCase: function (title) {
265
- return titleCase(title)
266
- },
267
- capitalise: function (text) {
268
- return capitalise(text)
269
- },
270
- openUrl: function (url) {
271
- window.open(url, '_blank')
272
- },
273
- openAll: function () {
274
- EventBus.emit('onActionClick', {
275
- type: 'Facets',
276
- labels: this.entry.componentsWithDatasets.map((a) => a.name),
277
- })
278
- },
279
- openAxons: function () {
280
- EventBus.emit('onActionClick', {
281
- type: 'Facets',
282
- labels: this.entry.destinationsWithDatasets.map((a) => a.name),
283
- })
284
- },
285
- openDendrites: function () {
286
- EventBus.emit('onActionClick', {
287
- type: 'Facets',
288
- labels: this.entry.originsWithDatasets.map((a) => a.name),
289
- })
290
- },
291
- pubmedSearchUrlUpdate: function (val) {
292
- this.pubmedSearchUrl = val
293
- },
294
- },
295
- }
296
- </script>
297
-
298
- <style lang="scss" scoped>
299
-
300
- .display {
301
- width: 44px;
302
- word-break: normal;
303
- }
304
-
305
- .title {
306
- text-align: left;
307
- // width: 16em;
308
- line-height: 1.5em !important;
309
- font-size: 1em;
310
- font-family: Helvetica;
311
- font-weight: 500;
312
- /* font-weight: bold; */
313
- padding-bottom: 8px;
314
- }
315
-
316
- .block {
317
- margin-bottom: 0.5em;
318
-
319
- .main > &:first-of-type {
320
- margin-right: 0.5em;
321
- }
322
- }
323
-
324
- .pub {
325
- width: 16rem;
326
- }
327
-
328
- .icon {
329
- right: 0px;
330
- position: absolute;
331
- top: 10px;
332
- }
333
-
334
- .icon:hover {
335
- cursor: pointer;
336
- }
337
-
338
- :deep(.popover-origin-help.el-popover) {
339
- text-transform: none !important; // need to overide the tooltip text transform
340
- border: 1px solid $app-primary-color;
341
- .el-popper__arrow {
342
- &:before {
343
- border-color: $app-primary-color;
344
- background-color: #ffffff;
345
- }
346
- }
347
- }
348
-
349
- .info {
350
- transform: rotate(180deg);
351
- color: #8300bf;
352
- margin-left: 8px;
353
- }
354
-
355
- .seperator {
356
- width: 90%;
357
- height: 1px;
358
- background-color: #bfbec2;
359
- }
360
-
361
- .hide {
362
- color: $app-primary-color;
363
- cursor: pointer;
364
- margin-right: 6px;
365
- margin-top: 3px;
366
- }
367
-
368
- .slide-fade-enter-active {
369
- transition: opacity 0.5s, transform 0.5s;
370
- }
371
- .slide-fade-leave-active {
372
- transition: opacity 0.2s, transform 0.2s;
373
- }
374
- .slide-fade-enter, .slide-fade-leave-to /* .slide-fade-leave-active in <2.1.8 */ {
375
- opacity: 0;
376
- transform: translateY(-8px);
377
- }
378
-
379
- .main {
380
- font-size: 14px;
381
- text-align: left;
382
- line-height: 1.5em;
383
- font-family: Asap, sans-serif, Helvetica;
384
- font-weight: 400;
385
- /* outline: thin red solid; */
386
- padding: 1em !important;
387
- overflow: hidden;
388
- min-width: 16rem;
389
- }
390
-
391
- .title {
392
- font-size: 18px;
393
- font-weight: 500;
394
- font-weight: bold;
395
- padding-bottom: 8px;
396
- color: rgb(131, 0, 191);
397
- }
398
-
399
- .attribute-title {
400
- font-size: 16px;
401
- font-weight: 600;
402
- /* font-weight: bold; */
403
- text-transform: uppercase;
404
- }
405
-
406
- .attribute-content {
407
- font-size: 14px;
408
- font-weight: 500;
409
- }
410
-
411
- .popover-container {
412
- height: 100%;
413
- width: 100%;
414
- }
415
-
416
- .main {
417
- .el-button.is-round {
418
- border-radius: 4px;
419
- padding: 9px 20px 10px 20px;
420
- display: flex;
421
- height: 36px;
422
- }
423
- }
424
-
425
- .button {
426
- margin-left: 0px !important;
427
- margin-top: 0px !important;
428
- font-size: 14px !important;
429
- background-color: $app-primary-color;
430
- color: #fff;
431
- & + .button {
432
- margin-top: 10px !important;
433
- }
434
- &:hover {
435
- color: #fff !important;
436
- background: #ac76c5 !important;
437
- border: 1px solid #ac76c5 !important;
438
- }
439
- }
440
-
441
- .tooltip-container {
442
- &::after,
443
- &::before {
444
- content: '';
445
- display: block;
446
- position: absolute;
447
- width: 0;
448
- height: 0;
449
- border-style: solid;
450
- flex-shrink: 0;
451
- }
452
- .tooltip {
453
- &::after {
454
- display: none;
455
- }
456
- &::before {
457
- display: none;
458
- }
459
- }
460
- }
461
-
462
- .maplibregl-popup-anchor-bottom {
463
- .tooltip-container {
464
- &::after,
465
- &::before {
466
- top: 100%;
467
- border-width: 12px;
468
- }
469
- &::after {
470
- margin-top: -1px;
471
- border-color: rgb(255, 255, 255) transparent transparent transparent;
472
- }
473
- &::before {
474
- margin: 0 auto;
475
- border-color: $app-primary-color transparent transparent transparent;
476
- }
477
- }
478
- }
479
-
480
- .maplibregl-popup-anchor-top {
481
- .tooltip-container {
482
- &::after,
483
- &::before {
484
- top: -24px;
485
- border-width: 12px;
486
- }
487
- &::after {
488
- margin-top: 1px;
489
- border-color: transparent transparent rgb(255, 255, 255) transparent;
490
- }
491
- &::before {
492
- margin: 0 auto;
493
- border-color: transparent transparent $app-primary-color transparent;
494
- }
495
- }
496
- }
497
-
498
- .content-container {
499
- overflow-y: scroll;
500
- scrollbar-width: thin !important;
501
- max-height: 240px;
502
-
503
- .block {
504
- padding-top: 0.5em;
505
- }
506
- }
507
-
508
- .scrollbar::-webkit-scrollbar-track {
509
- border-radius: 10px;
510
- background-color: #f5f5f5;
511
- }
512
-
513
- .scrollbar::-webkit-scrollbar {
514
- width: 12px;
515
- right: -12px;
516
- background-color: #f5f5f5;
517
- }
518
-
519
- .scrollbar::-webkit-scrollbar-thumb {
520
- border-radius: 4px;
521
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
522
- background-color: #979797;
523
- }
524
-
525
- /* Fix for chrome bug where under triangle pops up above one on top of it */
526
- .selector:not(*:root),
527
- .tooltip-container::after {
528
- top: 99.4%;
529
- }
530
- </style>
1
+ <template>
2
+ <div v-if="entry" class="main" v-loading="loading">
3
+ <div class="block" v-if="entry.title">
4
+ <div class="title">{{ capitalise(entry.title) }}</div>
5
+ <div
6
+ v-if="
7
+ entry.provenanceTaxonomyLabel &&
8
+ entry.provenanceTaxonomyLabel.length > 0
9
+ "
10
+ class="subtitle"
11
+ >
12
+ {{ provSpeciesDescription }}
13
+ </div>
14
+ </div>
15
+ <div class="block" v-else>
16
+ <div class="title">{{ entry.featureId }}</div>
17
+ </div>
18
+ <div v-if="featuresAlert">
19
+ <span class="attribute-title">Alert</span>
20
+ <el-popover
21
+ width="250"
22
+ trigger="hover"
23
+ :teleported="false"
24
+ popper-class="popover-origin-help"
25
+ >
26
+ <template #reference>
27
+ <el-icon class="info"><el-icon-warning /></el-icon>
28
+ </template>
29
+ <span style="word-break: keep-all">
30
+ {{ featuresAlert }}
31
+ </span>
32
+ </el-popover>
33
+ </div>
34
+ <div v-show="showDetails" class="hide" id="hide-path-info" @click="showDetails = false">
35
+ Hide path information
36
+ <el-icon><el-icon-arrow-up /></el-icon>
37
+ </div>
38
+ <div v-show="!showDetails" class="hide" id="show-path-info" @click="showDetails = true">
39
+ Show path information
40
+ <el-icon><el-icon-arrow-down /></el-icon>
41
+ </div>
42
+ <transition name="slide-fade">
43
+ <div v-show="showDetails" class="content-container scrollbar">
44
+ {{ entry.paths }}
45
+ <div v-if="entry.origins && entry.origins.length > 0" class="block">
46
+ <div>
47
+ <span class="attribute-title">Origin</span>
48
+ <el-popover
49
+ width="250"
50
+ trigger="hover"
51
+ :teleported="false"
52
+ popper-class="popover-origin-help"
53
+ >
54
+ <template #reference>
55
+ <el-icon class="info"><el-icon-warning /></el-icon>
56
+ </template>
57
+ <span style="word-break: keep-all">
58
+ <i>Origin</i> {{ originDescription }}
59
+ </span>
60
+
61
+ </el-popover>
62
+ </div>
63
+ <div
64
+ v-for="(origin, i) in entry.origins"
65
+ class="attribute-content"
66
+ :origin-item-label="origin"
67
+ :key="origin"
68
+ >
69
+ {{ capitalise(origin) }}
70
+ <div v-if="i != entry.origins.length - 1" class="seperator"></div>
71
+ </div>
72
+ <el-button
73
+ v-show="
74
+ entry.originsWithDatasets && entry.originsWithDatasets.length > 0
75
+ "
76
+ class="button"
77
+ id="open-dendrites-button"
78
+ @click="openDendrites"
79
+ >
80
+ Explore origin data
81
+ </el-button>
82
+ </div>
83
+ <div
84
+ v-if="entry.components && entry.components.length > 0"
85
+ class="block"
86
+ >
87
+ <div class="attribute-title">Components</div>
88
+ <div
89
+ v-for="(component, i) in entry.components"
90
+ class="attribute-content"
91
+ :component-item-label="component"
92
+ :key="component"
93
+ >
94
+ {{ capitalise(component) }}
95
+ <div
96
+ v-if="i != entry.components.length - 1"
97
+ class="seperator"
98
+ ></div>
99
+ </div>
100
+ </div>
101
+ <div
102
+ v-if="entry.destinations && entry.destinations.length > 0"
103
+ class="block"
104
+ >
105
+ <div>
106
+ <span class="attribute-title">Destination</span>
107
+ <el-popover
108
+ width="250"
109
+ trigger="hover"
110
+ :teleported="false"
111
+ popper-class="popover-origin-help"
112
+ >
113
+ <template #reference>
114
+ <el-icon class="info"><el-icon-warning /></el-icon>
115
+ </template>
116
+ <span style="word-break: keep-all">
117
+ <i>Destination</i> is where the axons terminate
118
+ </span>
119
+ </el-popover>
120
+ </div>
121
+ <div
122
+ v-for="(destination, i) in entry.destinations"
123
+ class="attribute-content"
124
+ :destination-item-label="destination"
125
+ :key="destination"
126
+ >
127
+ {{ capitalise(destination) }}
128
+ <div
129
+ v-if="i != entry.destinations.length - 1"
130
+ class="seperator"
131
+ ></div>
132
+ </div>
133
+ <el-button
134
+ v-show="
135
+ entry.destinationsWithDatasets &&
136
+ entry.destinationsWithDatasets.length > 0
137
+ "
138
+ class="button"
139
+ @click="openAxons"
140
+ >
141
+ Explore destination data
142
+ </el-button>
143
+ </div>
144
+
145
+ <el-button
146
+ v-show="
147
+ entry.componentsWithDatasets &&
148
+ entry.componentsWithDatasets.length > 0
149
+ "
150
+ class="button"
151
+ @click="openAll"
152
+ >
153
+ Search for data on components
154
+ </el-button>
155
+
156
+ <external-resource-card :resources="resources"></external-resource-card>
157
+ </div>
158
+ </transition>
159
+ </div>
160
+ </template>
161
+
162
+ <script>
163
+ import {
164
+ ArrowUp as ElIconArrowUp,
165
+ ArrowDown as ElIconArrowDown,
166
+ Warning as ElIconWarning,
167
+ } from '@element-plus/icons-vue'
168
+ /* eslint-disable no-alert, no-console */
169
+ import {
170
+ ElButton as Button,
171
+ ElContainer as Container,
172
+ ElIcon as Icon,
173
+ } from 'element-plus'
174
+
175
+ import EventBus from './EventBus'
176
+ import ExternalResourceCard from './ExternalResourceCard.vue'
177
+
178
+ const titleCase = (str) => {
179
+ return str.replace(/\w\S*/g, (t) => {
180
+ return t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()
181
+ })
182
+ }
183
+
184
+ const capitalise = function (str) {
185
+ if (str) return str.charAt(0).toUpperCase() + str.slice(1)
186
+ return ''
187
+ }
188
+
189
+ export default {
190
+ name: 'ProvenancePopup',
191
+ components: {
192
+ Button,
193
+ Container,
194
+ Icon,
195
+ ExternalResourceCard,
196
+ ElIconArrowUp,
197
+ ElIconArrowDown,
198
+ ElIconWarning,
199
+ },
200
+ props: {
201
+ entry: {
202
+ type: Object,
203
+ default: () => ({
204
+ destinations: [],
205
+ origins: [],
206
+ components: [],
207
+ destinationsWithDatasets: [],
208
+ originsWithDatasets: [],
209
+ componentsWithDatasets: [],
210
+ resource: undefined,
211
+ }),
212
+ },
213
+ },
214
+ inject: ['getFeaturesAlert'],
215
+ data: function () {
216
+ return {
217
+ controller: undefined,
218
+ activeSpecies: undefined,
219
+ pubmedSearchUrl: '',
220
+ loading: false,
221
+ showToolip: false,
222
+ showDetails: false,
223
+ originDescriptions: {
224
+ motor: 'is the location of the initial cell body of the circuit',
225
+ sensory: 'is the location of the initial cell body in the PNS circuit',
226
+ },
227
+ componentsWithDatasets: [],
228
+ uberons: [{ id: undefined, name: undefined }],
229
+ }
230
+ },
231
+ computed: {
232
+ featuresAlert() {
233
+ return this.getFeaturesAlert()
234
+ },
235
+ resources: function () {
236
+ let resources = []
237
+ if (this.entry && this.entry.hyperlinks) {
238
+ resources = this.entry.hyperlinks
239
+ }
240
+ return resources
241
+ },
242
+ originDescription: function () {
243
+ if (
244
+ this.entry &&
245
+ this.entry.title &&
246
+ this.entry.title.toLowerCase().includes('motor')
247
+ ) {
248
+ return this.originDescriptions.motor
249
+ } else {
250
+ return this.originDescriptions.sensory
251
+ }
252
+ },
253
+ provSpeciesDescription: function () {
254
+ let text = 'Studied in'
255
+ this.entry.provenanceTaxonomyLabel.forEach((label) => {
256
+ text += ` ${label},`
257
+ })
258
+ text = text.slice(0, -1) // remove last comma
259
+ text += ' species'
260
+ return text
261
+ },
262
+ },
263
+ methods: {
264
+ titleCase: function (title) {
265
+ return titleCase(title)
266
+ },
267
+ capitalise: function (text) {
268
+ return capitalise(text)
269
+ },
270
+ openUrl: function (url) {
271
+ window.open(url, '_blank')
272
+ },
273
+ openAll: function () {
274
+ EventBus.emit('onActionClick', {
275
+ type: 'Facets',
276
+ labels: this.entry.componentsWithDatasets.map((a) => a.name),
277
+ })
278
+ },
279
+ openAxons: function () {
280
+ EventBus.emit('onActionClick', {
281
+ type: 'Facets',
282
+ labels: this.entry.destinationsWithDatasets.map((a) => a.name),
283
+ })
284
+ },
285
+ openDendrites: function () {
286
+ EventBus.emit('onActionClick', {
287
+ type: 'Facets',
288
+ labels: this.entry.originsWithDatasets.map((a) => a.name),
289
+ })
290
+ },
291
+ pubmedSearchUrlUpdate: function (val) {
292
+ this.pubmedSearchUrl = val
293
+ },
294
+ },
295
+ }
296
+ </script>
297
+
298
+ <style lang="scss" scoped>
299
+
300
+ .display {
301
+ width: 44px;
302
+ word-break: normal;
303
+ }
304
+
305
+ .title {
306
+ text-align: left;
307
+ // width: 16em;
308
+ line-height: 1.5em !important;
309
+ font-size: 1em;
310
+ font-family: Helvetica;
311
+ font-weight: 500;
312
+ /* font-weight: bold; */
313
+ padding-bottom: 8px;
314
+ }
315
+
316
+ .block {
317
+ margin-bottom: 0.5em;
318
+
319
+ .main > &:first-of-type {
320
+ margin-right: 0.5em;
321
+ }
322
+ }
323
+
324
+ .pub {
325
+ width: 16rem;
326
+ }
327
+
328
+ .icon {
329
+ right: 0px;
330
+ position: absolute;
331
+ top: 10px;
332
+ }
333
+
334
+ .icon:hover {
335
+ cursor: pointer;
336
+ }
337
+
338
+ :deep(.popover-origin-help.el-popover) {
339
+ text-transform: none !important; // need to overide the tooltip text transform
340
+ border: 1px solid $app-primary-color;
341
+ .el-popper__arrow {
342
+ &:before {
343
+ border-color: $app-primary-color;
344
+ background-color: #ffffff;
345
+ }
346
+ }
347
+ }
348
+
349
+ .info {
350
+ transform: rotate(180deg);
351
+ color: #8300bf;
352
+ margin-left: 8px;
353
+ }
354
+
355
+ .seperator {
356
+ width: 90%;
357
+ height: 1px;
358
+ background-color: #bfbec2;
359
+ }
360
+
361
+ .hide {
362
+ color: $app-primary-color;
363
+ cursor: pointer;
364
+ margin-right: 6px;
365
+ margin-top: 3px;
366
+ }
367
+
368
+ .slide-fade-enter-active {
369
+ transition: opacity 0.5s, transform 0.5s;
370
+ }
371
+ .slide-fade-leave-active {
372
+ transition: opacity 0.2s, transform 0.2s;
373
+ }
374
+ .slide-fade-enter, .slide-fade-leave-to /* .slide-fade-leave-active in <2.1.8 */ {
375
+ opacity: 0;
376
+ transform: translateY(-8px);
377
+ }
378
+
379
+ .main {
380
+ font-size: 14px;
381
+ text-align: left;
382
+ line-height: 1.5em;
383
+ font-family: Asap, sans-serif, Helvetica;
384
+ font-weight: 400;
385
+ /* outline: thin red solid; */
386
+ padding: 1em !important;
387
+ overflow: hidden;
388
+ min-width: 16rem;
389
+ }
390
+
391
+ .title {
392
+ font-size: 18px;
393
+ font-weight: 500;
394
+ font-weight: bold;
395
+ padding-bottom: 8px;
396
+ color: rgb(131, 0, 191);
397
+ }
398
+
399
+ .attribute-title {
400
+ font-size: 16px;
401
+ font-weight: 600;
402
+ /* font-weight: bold; */
403
+ text-transform: uppercase;
404
+ }
405
+
406
+ .attribute-content {
407
+ font-size: 14px;
408
+ font-weight: 500;
409
+ }
410
+
411
+ .popover-container {
412
+ height: 100%;
413
+ width: 100%;
414
+ }
415
+
416
+ .main {
417
+ .el-button.is-round {
418
+ border-radius: 4px;
419
+ padding: 9px 20px 10px 20px;
420
+ display: flex;
421
+ height: 36px;
422
+ }
423
+ }
424
+
425
+ .button {
426
+ margin-left: 0px !important;
427
+ margin-top: 0px !important;
428
+ font-size: 14px !important;
429
+ background-color: $app-primary-color;
430
+ color: #fff;
431
+ & + .button {
432
+ margin-top: 10px !important;
433
+ }
434
+ &:hover {
435
+ color: #fff !important;
436
+ background: #ac76c5 !important;
437
+ border: 1px solid #ac76c5 !important;
438
+ }
439
+ }
440
+
441
+ .tooltip-container {
442
+ &::after,
443
+ &::before {
444
+ content: '';
445
+ display: block;
446
+ position: absolute;
447
+ width: 0;
448
+ height: 0;
449
+ border-style: solid;
450
+ flex-shrink: 0;
451
+ }
452
+ .tooltip {
453
+ &::after {
454
+ display: none;
455
+ }
456
+ &::before {
457
+ display: none;
458
+ }
459
+ }
460
+ }
461
+
462
+ .maplibregl-popup-anchor-bottom {
463
+ .tooltip-container {
464
+ &::after,
465
+ &::before {
466
+ top: 100%;
467
+ border-width: 12px;
468
+ }
469
+ &::after {
470
+ margin-top: -1px;
471
+ border-color: rgb(255, 255, 255) transparent transparent transparent;
472
+ }
473
+ &::before {
474
+ margin: 0 auto;
475
+ border-color: $app-primary-color transparent transparent transparent;
476
+ }
477
+ }
478
+ }
479
+
480
+ .maplibregl-popup-anchor-top {
481
+ .tooltip-container {
482
+ &::after,
483
+ &::before {
484
+ top: -24px;
485
+ border-width: 12px;
486
+ }
487
+ &::after {
488
+ margin-top: 1px;
489
+ border-color: transparent transparent rgb(255, 255, 255) transparent;
490
+ }
491
+ &::before {
492
+ margin: 0 auto;
493
+ border-color: transparent transparent $app-primary-color transparent;
494
+ }
495
+ }
496
+ }
497
+
498
+ .content-container {
499
+ overflow-y: scroll;
500
+ scrollbar-width: thin !important;
501
+ max-height: 240px;
502
+
503
+ .block {
504
+ padding-top: 0.5em;
505
+ }
506
+ }
507
+
508
+ .scrollbar::-webkit-scrollbar-track {
509
+ border-radius: 10px;
510
+ background-color: #f5f5f5;
511
+ }
512
+
513
+ .scrollbar::-webkit-scrollbar {
514
+ width: 12px;
515
+ right: -12px;
516
+ background-color: #f5f5f5;
517
+ }
518
+
519
+ .scrollbar::-webkit-scrollbar-thumb {
520
+ border-radius: 4px;
521
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
522
+ background-color: #979797;
523
+ }
524
+
525
+ /* Fix for chrome bug where under triangle pops up above one on top of it */
526
+ .selector:not(*:root),
527
+ .tooltip-container::after {
528
+ top: 99.4%;
529
+ }
530
+ </style>