@abi-software/map-side-bar 2.13.0-acupoint.7 → 2.13.0-acupoint.8
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 +6780 -6588
- package/dist/map-side-bar.umd.cjs +33 -29
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/AcupointsInfoSearch.vue +1 -1
- package/src/components/ConnectivityCard.vue +20 -3
- package/src/components/ConnectivityExplorer.vue +8 -1
- package/src/components/ConnectivityInfo.vue +386 -73
- package/src/components/SideBar.vue +6 -1
- package/src/components.d.ts +1 -0
|
@@ -4,25 +4,44 @@
|
|
|
4
4
|
<div class="connectivity-info-title">
|
|
5
5
|
<div class="title-content">
|
|
6
6
|
<div class="block" v-if="entry.title">
|
|
7
|
-
<div class="title">
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
<div class="title-group">
|
|
8
|
+
<div
|
|
9
|
+
ref="titleElement"
|
|
10
|
+
class="title"
|
|
11
|
+
:class="{ 'title--clamped': !isTitleExpanded }"
|
|
12
|
+
@click="toggleTitleExpansion"
|
|
13
|
+
>
|
|
14
|
+
<span>{{ capitalise(displayTitle) }}</span>
|
|
15
|
+
<template v-if="entry.featuresAlert">
|
|
16
|
+
<el-popover
|
|
17
|
+
width="250"
|
|
18
|
+
trigger="hover"
|
|
19
|
+
:teleported="false"
|
|
20
|
+
popper-class="popover-origin-help"
|
|
21
|
+
>
|
|
22
|
+
<template #reference>
|
|
23
|
+
<el-icon class="alert"><el-icon-warn-triangle-filled /></el-icon>
|
|
24
|
+
</template>
|
|
25
|
+
<span style="word-break: keep-all">
|
|
26
|
+
{{ entry.featuresAlert }}
|
|
27
|
+
</span>
|
|
28
|
+
</el-popover>
|
|
29
|
+
</template>
|
|
30
|
+
</div>
|
|
31
|
+
<button
|
|
32
|
+
v-if="showTitleToggle"
|
|
33
|
+
class="title-toggle"
|
|
34
|
+
type="button"
|
|
35
|
+
@click="toggleTitleExpansion"
|
|
36
|
+
>
|
|
37
|
+
{{ isTitleExpanded ? 'Collapse' : 'Expand title' }}
|
|
38
|
+
<el-icon class="title-toggle-icon">
|
|
39
|
+
<el-icon-arrow-up v-if="isTitleExpanded" />
|
|
40
|
+
<el-icon-arrow-down v-else />
|
|
41
|
+
</el-icon>
|
|
42
|
+
</button>
|
|
24
43
|
</div>
|
|
25
|
-
<div class="subtitle"><strong>
|
|
44
|
+
<div class="subtitle"><strong>Id: </strong>{{ entry.featureId[0] }}</div>
|
|
26
45
|
<div v-if="hasProvenanceTaxonomyLabel" class="subtitle">
|
|
27
46
|
{{ provSpeciesDescription }}
|
|
28
47
|
</div>
|
|
@@ -70,9 +89,9 @@
|
|
|
70
89
|
</div>
|
|
71
90
|
</div>
|
|
72
91
|
|
|
73
|
-
<div class="content-container population-
|
|
92
|
+
<div class="content-container population-details" :class="{'flex-row': hasSingleConnectivityList}">
|
|
74
93
|
<div class="block attribute-title-container">
|
|
75
|
-
<span class="attribute-title">Population
|
|
94
|
+
<span class="attribute-title">Population Details</span>
|
|
76
95
|
<el-popover
|
|
77
96
|
v-if="activeView === 'listView'"
|
|
78
97
|
width="250"
|
|
@@ -83,14 +102,33 @@
|
|
|
83
102
|
<template #reference>
|
|
84
103
|
<el-icon class="info"><el-icon-warning /></el-icon>
|
|
85
104
|
</template>
|
|
86
|
-
<span style="word-break: keep-all">
|
|
105
|
+
<span v-if="hasSingleConnectivityList" style="word-break: keep-all">
|
|
106
|
+
This list is ordered alphabetically. Switch to graph view for path details,
|
|
107
|
+
and use the legend below for reconciliation status.
|
|
108
|
+
</span>
|
|
109
|
+
<span v-else style="word-break: keep-all">
|
|
87
110
|
This list is ordered alphabetically,
|
|
88
111
|
switch to graph view for path details.
|
|
89
112
|
</span>
|
|
113
|
+
<div v-if="hasSingleConnectivityList" class="connectivity-legends">
|
|
114
|
+
<div class="legend-title">Legend</div>
|
|
115
|
+
<span class="legend-item">
|
|
116
|
+
<span class="legend-color differ"></span>
|
|
117
|
+
SCKAN feature alias to Map feature
|
|
118
|
+
</span>
|
|
119
|
+
<span class="legend-item">
|
|
120
|
+
<span class="legend-color unavailable"></span>
|
|
121
|
+
SCKAN feature unavailable on Map
|
|
122
|
+
</span>
|
|
123
|
+
<span class="legend-item">
|
|
124
|
+
<span class="legend-color mapped"></span>
|
|
125
|
+
SCKAN feature available on Map
|
|
126
|
+
</span>
|
|
127
|
+
</div>
|
|
90
128
|
</el-popover>
|
|
91
129
|
</div>
|
|
92
130
|
<div class="block buttons-row">
|
|
93
|
-
<div class="population-
|
|
131
|
+
<div class="population-details-source" v-if="!hasSingleConnectivityList">
|
|
94
132
|
<span>
|
|
95
133
|
Connectivity from:
|
|
96
134
|
<el-popover
|
|
@@ -114,7 +152,7 @@
|
|
|
114
152
|
<el-radio value="sckan">SCKAN</el-radio>
|
|
115
153
|
</el-radio-group>
|
|
116
154
|
</div>
|
|
117
|
-
<div class="population-
|
|
155
|
+
<div class="population-details-view" :class="{'align-right': hasSingleConnectivityList}">
|
|
118
156
|
<el-button
|
|
119
157
|
:class="activeView === 'listView' ? 'button' : 'el-button-secondary'"
|
|
120
158
|
@click="switchConnectivityView('listView')"
|
|
@@ -171,22 +209,46 @@
|
|
|
171
209
|
</div>
|
|
172
210
|
|
|
173
211
|
<div class="content-container content-container-connectivity" v-show="activeView === 'listView'">
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
212
|
+
<!-- TODO: To use only one component when the data is ready -->
|
|
213
|
+
<temmplate v-if="hasSingleConnectivityList">
|
|
214
|
+
<connectivity-reconciliation-list
|
|
215
|
+
v-loading="connectivityLoading"
|
|
216
|
+
:key="`${connectivityKey}list`"
|
|
217
|
+
:entry="entry"
|
|
218
|
+
:origins="origins"
|
|
219
|
+
:components="components"
|
|
220
|
+
:destinations="destinations"
|
|
221
|
+
:originsWithDatasets="originsWithDatasets"
|
|
222
|
+
:componentsWithDatasets="componentsWithDatasets"
|
|
223
|
+
:destinationsWithDatasets="destinationsWithDatasets"
|
|
224
|
+
:destinationsCombinations="destinationsCombinations"
|
|
225
|
+
:originsCombinations="originsCombinations"
|
|
226
|
+
:componentsCombinations="componentsCombinations"
|
|
227
|
+
:availableAnatomyFacets="availableAnatomyFacets"
|
|
228
|
+
:connectivityError="connectivityError"
|
|
229
|
+
@connectivity-hovered="onConnectivityHovered"
|
|
230
|
+
@connectivity-clicked="onConnectivityClicked"
|
|
231
|
+
@connectivity-action-click="onConnectivityActionClick"
|
|
232
|
+
/>
|
|
233
|
+
</temmplate>
|
|
234
|
+
<template v-else>
|
|
235
|
+
<connectivity-list
|
|
236
|
+
v-loading="connectivityLoading"
|
|
237
|
+
:key="`${connectivityKey}list`"
|
|
238
|
+
:entry="entry"
|
|
239
|
+
:origins="origins"
|
|
240
|
+
:components="components"
|
|
241
|
+
:destinations="destinations"
|
|
242
|
+
:originsWithDatasets="originsWithDatasets"
|
|
243
|
+
:componentsWithDatasets="componentsWithDatasets"
|
|
244
|
+
:destinationsWithDatasets="destinationsWithDatasets"
|
|
245
|
+
:availableAnatomyFacets="availableAnatomyFacets"
|
|
246
|
+
:connectivityError="connectivityError"
|
|
247
|
+
@connectivity-hovered="onConnectivityHovered"
|
|
248
|
+
@connectivity-clicked="onConnectivityClicked"
|
|
249
|
+
@connectivity-action-click="onConnectivityActionClick"
|
|
250
|
+
/>
|
|
251
|
+
</template>
|
|
190
252
|
</div>
|
|
191
253
|
|
|
192
254
|
<div class="content-container content-container-connectivity" v-show="activeView === 'graphView'">
|
|
@@ -221,6 +283,8 @@ import {
|
|
|
221
283
|
Warning as ElIconWarning,
|
|
222
284
|
Location as ElIconLocation,
|
|
223
285
|
Search as ElIconSearch,
|
|
286
|
+
ArrowDown as ElIconArrowDown,
|
|
287
|
+
ArrowUp as ElIconArrowUp,
|
|
224
288
|
} from '@element-plus/icons-vue'
|
|
225
289
|
import {
|
|
226
290
|
ElButton as Button,
|
|
@@ -233,6 +297,7 @@ import {
|
|
|
233
297
|
CopyToClipboard,
|
|
234
298
|
ConnectivityGraph,
|
|
235
299
|
ConnectivityList,
|
|
300
|
+
ConnectivityReconciliationList,
|
|
236
301
|
ExternalResourceCard,
|
|
237
302
|
} from '@abi-software/map-utilities';
|
|
238
303
|
import '@abi-software/map-utilities/dist/style.css';
|
|
@@ -257,16 +322,23 @@ export default {
|
|
|
257
322
|
ElIconWarning,
|
|
258
323
|
ElIconLocation,
|
|
259
324
|
ElIconSearch,
|
|
325
|
+
ElIconArrowDown,
|
|
326
|
+
ElIconArrowUp,
|
|
260
327
|
ExternalResourceCard,
|
|
261
328
|
CopyToClipboard,
|
|
262
329
|
ConnectivityGraph,
|
|
263
330
|
ConnectivityList,
|
|
331
|
+
ConnectivityReconciliationList,
|
|
264
332
|
},
|
|
265
333
|
props: {
|
|
266
334
|
connectivityEntry: {
|
|
267
335
|
type: Array,
|
|
268
336
|
default: [],
|
|
269
337
|
},
|
|
338
|
+
entryData: {
|
|
339
|
+
type: Object,
|
|
340
|
+
default: () => ({}),
|
|
341
|
+
},
|
|
270
342
|
entryId: {
|
|
271
343
|
type: String,
|
|
272
344
|
default: "",
|
|
@@ -283,6 +355,10 @@ export default {
|
|
|
283
355
|
type: Boolean,
|
|
284
356
|
default: false,
|
|
285
357
|
},
|
|
358
|
+
showLongLabel: {
|
|
359
|
+
type: Boolean,
|
|
360
|
+
default: false,
|
|
361
|
+
},
|
|
286
362
|
},
|
|
287
363
|
data: function () {
|
|
288
364
|
return {
|
|
@@ -294,6 +370,8 @@ export default {
|
|
|
294
370
|
connectivityError: {},
|
|
295
371
|
graphViewLoaded: false,
|
|
296
372
|
connectivityFromMap: null,
|
|
373
|
+
isTitleExpanded: false,
|
|
374
|
+
showTitleToggle: false,
|
|
297
375
|
};
|
|
298
376
|
},
|
|
299
377
|
computed: {
|
|
@@ -302,6 +380,12 @@ export default {
|
|
|
302
380
|
return entry.featureId[0] === this.entryId;
|
|
303
381
|
});
|
|
304
382
|
},
|
|
383
|
+
displayTitle: function () {
|
|
384
|
+
if (this.showLongLabel) {
|
|
385
|
+
return this.entryData?.['long-label'] || this.entry?.['long-label'] || '';
|
|
386
|
+
}
|
|
387
|
+
return this.entry?.title || '';
|
|
388
|
+
},
|
|
305
389
|
hasProvenanceTaxonomyLabel: function () {
|
|
306
390
|
return (
|
|
307
391
|
this.entry.provenanceTaxonomyLabel &&
|
|
@@ -338,6 +422,18 @@ export default {
|
|
|
338
422
|
destinationsWithDatasets: function () {
|
|
339
423
|
return this.entry.destinationsWithDatasets;
|
|
340
424
|
},
|
|
425
|
+
hasSingleConnectivityList: function () {
|
|
426
|
+
return this.entry.hasSingleConnectivityList;
|
|
427
|
+
},
|
|
428
|
+
destinationsCombinations: function () {
|
|
429
|
+
return this.entry.destinationsCombinations || [];
|
|
430
|
+
},
|
|
431
|
+
originsCombinations: function () {
|
|
432
|
+
return this.entry.originsCombinations || [];
|
|
433
|
+
},
|
|
434
|
+
componentsCombinations: function () {
|
|
435
|
+
return this.entry.componentsCombinations || [];
|
|
436
|
+
},
|
|
341
437
|
resources: function () {
|
|
342
438
|
return this.entry.hyperlinks || [];
|
|
343
439
|
},
|
|
@@ -369,9 +465,16 @@ export default {
|
|
|
369
465
|
if (!oldVal || newVal?.featureId[0] !== oldVal?.featureId[0]) {
|
|
370
466
|
this.$emit('loaded');
|
|
371
467
|
}
|
|
468
|
+
|
|
469
|
+
this.isTitleExpanded = false;
|
|
470
|
+
this.updateTitleToggleVisibility();
|
|
372
471
|
}
|
|
373
472
|
},
|
|
374
473
|
},
|
|
474
|
+
displayTitle: function () {
|
|
475
|
+
this.isTitleExpanded = false;
|
|
476
|
+
this.updateTitleToggleVisibility();
|
|
477
|
+
},
|
|
375
478
|
},
|
|
376
479
|
methods: {
|
|
377
480
|
titleCase: function (title) {
|
|
@@ -380,6 +483,39 @@ export default {
|
|
|
380
483
|
capitalise: function (text) {
|
|
381
484
|
return capitalise(text)
|
|
382
485
|
},
|
|
486
|
+
toggleTitleExpansion: function () {
|
|
487
|
+
this.isTitleExpanded = !this.isTitleExpanded;
|
|
488
|
+
if (!this.isTitleExpanded) {
|
|
489
|
+
this.$nextTick(() => {
|
|
490
|
+
this.updateTitleToggleVisibility();
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
updateTitleToggleVisibility: function () {
|
|
495
|
+
this.$nextTick(() => {
|
|
496
|
+
const titleElement = this.$refs.titleElement;
|
|
497
|
+
if (!titleElement) {
|
|
498
|
+
this.showTitleToggle = false;
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
const wasExpanded = this.isTitleExpanded;
|
|
503
|
+
if (wasExpanded) {
|
|
504
|
+
titleElement.classList.add('title--clamped');
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
const hasOverflow = titleElement.scrollHeight > titleElement.clientHeight + 1;
|
|
508
|
+
this.showTitleToggle = hasOverflow;
|
|
509
|
+
|
|
510
|
+
if (wasExpanded) {
|
|
511
|
+
titleElement.classList.remove('title--clamped');
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
if (!hasOverflow) {
|
|
515
|
+
this.isTitleExpanded = false;
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
},
|
|
383
519
|
showConnectivity: function () {
|
|
384
520
|
// move the map center to highlighted area
|
|
385
521
|
const featureIds = this.entry.featureId || [];
|
|
@@ -438,23 +574,25 @@ export default {
|
|
|
438
574
|
// to avoid default formatting on font size and margin
|
|
439
575
|
|
|
440
576
|
// Title
|
|
441
|
-
|
|
577
|
+
const title = this.entry?.title || '';
|
|
578
|
+
const longLabel = this.entryData?.['long-label'] || this.entry?.['long-label'] || '';
|
|
442
579
|
let featureId = this.entry.featureId;
|
|
443
580
|
const titleContent = [];
|
|
444
581
|
|
|
445
|
-
|
|
446
|
-
|
|
582
|
+
const displayLabel = capitalise(longLabel || title);
|
|
583
|
+
if (displayLabel) {
|
|
584
|
+
titleContent.push(`<div><strong>${displayLabel}</strong></div>`);
|
|
447
585
|
}
|
|
448
586
|
|
|
449
587
|
if (featureId?.length) {
|
|
450
588
|
if (typeof featureId === 'object') {
|
|
451
|
-
titleContent.push(
|
|
589
|
+
titleContent.push(`<div><strong>Id:</strong> ${featureId[0]}</div>`);
|
|
452
590
|
} else {
|
|
453
|
-
titleContent.push(
|
|
591
|
+
titleContent.push(`<div><strong>Id:</strong> ${featureId}</div>`);
|
|
454
592
|
}
|
|
455
593
|
}
|
|
456
594
|
|
|
457
|
-
contentArray.push(`<div>${titleContent.join('
|
|
595
|
+
contentArray.push(`<div>${titleContent.join('\n')}</div>`);
|
|
458
596
|
|
|
459
597
|
// Description
|
|
460
598
|
if (this.entry.provenanceTaxonomyLabel?.length) {
|
|
@@ -466,6 +604,9 @@ export default {
|
|
|
466
604
|
contentArray.push(`<div>${this.entry.paths}</div>`);
|
|
467
605
|
}
|
|
468
606
|
|
|
607
|
+
let hasUnavailableReference = false;
|
|
608
|
+
let hasDifferReference = false;
|
|
609
|
+
|
|
469
610
|
function transformData(title, items, itemsWithDatasets = []) {
|
|
470
611
|
let contentString = `<div><strong>${title}</strong></div>`;
|
|
471
612
|
const transformedItems = [];
|
|
@@ -489,6 +630,54 @@ export default {
|
|
|
489
630
|
return contentString;
|
|
490
631
|
}
|
|
491
632
|
|
|
633
|
+
function transformReconciliationData(title, combinations = []) {
|
|
634
|
+
let contentString = `<div><strong>${title}</strong></div>`;
|
|
635
|
+
const sortedCombinations = [...combinations].sort((a, b) => {
|
|
636
|
+
const labelA = (a?.sckanLabel || a?.mapLabel || '').toLowerCase();
|
|
637
|
+
const labelB = (b?.sckanLabel || b?.mapLabel || '').toLowerCase();
|
|
638
|
+
return labelA.localeCompare(labelB);
|
|
639
|
+
});
|
|
640
|
+
const getFirstId = (idArr) => {
|
|
641
|
+
if (!idArr?.length) return null;
|
|
642
|
+
const first = idArr[0];
|
|
643
|
+
return typeof first === 'string' ? first : (first?.[0] || null);
|
|
644
|
+
};
|
|
645
|
+
const transformedItems = sortedCombinations.map((item) => {
|
|
646
|
+
const isDirectMatch =
|
|
647
|
+
item?.sckanId &&
|
|
648
|
+
item?.mapId &&
|
|
649
|
+
JSON.stringify(item.sckanId) === JSON.stringify(item.mapId);
|
|
650
|
+
|
|
651
|
+
if (isDirectMatch) {
|
|
652
|
+
const id = getFirstId(item.mapId);
|
|
653
|
+
const label = capitalise(item.sckanLabel || item.mapLabel || '-');
|
|
654
|
+
return id ? `${label} (${id})` : label;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
const sckanLabel = item?.sckanLabel ? capitalise(item.sckanLabel) : '-';
|
|
658
|
+
const sckanId = getFirstId(item.sckanId);
|
|
659
|
+
const sckanLabelWithId = sckanId ? `${sckanLabel} (${sckanId})` : sckanLabel;
|
|
660
|
+
const isUnavailableOnMap = !item?.mapId?.length || !item?.mapLabel;
|
|
661
|
+
|
|
662
|
+
if (isUnavailableOnMap) {
|
|
663
|
+
hasUnavailableReference = true;
|
|
664
|
+
return `<s>${sckanLabelWithId}</s> (unavailable on <strong>Map</strong>) *`;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
const mapLabel = capitalise(item.mapLabel);
|
|
668
|
+
const mapId = getFirstId(item.mapId);
|
|
669
|
+
const mapLabelWithId = mapId ? `${mapLabel} (${mapId})` : mapLabel;
|
|
670
|
+
hasDifferReference = true;
|
|
671
|
+
return `<s>${sckanLabelWithId}</s> (<strong>Map:</strong> ${mapLabelWithId}) **`;
|
|
672
|
+
});
|
|
673
|
+
const contentList = transformedItems
|
|
674
|
+
.map((item) => `<li>${item}</li>`)
|
|
675
|
+
.join('\n');
|
|
676
|
+
contentString += '\n';
|
|
677
|
+
contentString += `<ul>${contentList}</ul>`;
|
|
678
|
+
return contentString;
|
|
679
|
+
}
|
|
680
|
+
|
|
492
681
|
// Nerves
|
|
493
682
|
if (this.entry['nerve-label']?.length) {
|
|
494
683
|
const title = 'Nerves';
|
|
@@ -498,31 +687,48 @@ export default {
|
|
|
498
687
|
contentArray.push(transformedNerves);
|
|
499
688
|
}
|
|
500
689
|
|
|
501
|
-
// Origins
|
|
502
|
-
if (this.
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
contentArray.push(transformedOrigins);
|
|
508
|
-
}
|
|
690
|
+
// Origins / Components / Destination
|
|
691
|
+
if (this.hasSingleConnectivityList) {
|
|
692
|
+
if (this.originsCombinations?.length) {
|
|
693
|
+
const transformedOrigins = transformReconciliationData('Origin', this.originsCombinations);
|
|
694
|
+
contentArray.push(transformedOrigins);
|
|
695
|
+
}
|
|
509
696
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
const componentsWithDatasets = this.componentsWithDatasets;
|
|
515
|
-
const transformedComponents = transformData(title, components, componentsWithDatasets);
|
|
516
|
-
contentArray.push(transformedComponents);
|
|
517
|
-
}
|
|
697
|
+
if (this.componentsCombinations?.length) {
|
|
698
|
+
const transformedComponents = transformReconciliationData('Components', this.componentsCombinations);
|
|
699
|
+
contentArray.push(transformedComponents);
|
|
700
|
+
}
|
|
518
701
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
702
|
+
if (this.destinationsCombinations?.length) {
|
|
703
|
+
const transformedDestinations = transformReconciliationData('Destination', this.destinationsCombinations);
|
|
704
|
+
contentArray.push(transformedDestinations);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
if (hasUnavailableReference || hasDifferReference) {
|
|
708
|
+
const legendNotes = [];
|
|
709
|
+
if (hasUnavailableReference) {
|
|
710
|
+
legendNotes.push('<div>* SCKAN feature unavailable on Map</div>');
|
|
711
|
+
}
|
|
712
|
+
if (hasDifferReference) {
|
|
713
|
+
legendNotes.push('<div>** SCKAN feature alias to Map feature</div>');
|
|
714
|
+
}
|
|
715
|
+
contentArray.push(`<div>${legendNotes.join('\n')}</div>`);
|
|
716
|
+
}
|
|
717
|
+
} else {
|
|
718
|
+
if (this.origins?.length) {
|
|
719
|
+
const transformedOrigins = transformData('Origin', this.origins, this.originsWithDatasets);
|
|
720
|
+
contentArray.push(transformedOrigins);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
if (this.components?.length) {
|
|
724
|
+
const transformedComponents = transformData('Components', this.components, this.componentsWithDatasets);
|
|
725
|
+
contentArray.push(transformedComponents);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
if (this.destinations?.length) {
|
|
729
|
+
const transformedDestinations = transformData('Destination', this.destinations, this.destinationsWithDatasets);
|
|
730
|
+
contentArray.push(transformedDestinations);
|
|
731
|
+
}
|
|
526
732
|
}
|
|
527
733
|
|
|
528
734
|
// References
|
|
@@ -665,6 +871,7 @@ export default {
|
|
|
665
871
|
},
|
|
666
872
|
mounted: function () {
|
|
667
873
|
this.updatedCopyContent = this.getUpdateCopyContent();
|
|
874
|
+
this.updateTitleToggleVisibility();
|
|
668
875
|
|
|
669
876
|
EventBus.on('connectivity-error', (errorInfo) => {
|
|
670
877
|
const connectivityError = this.getConnectivityError(errorInfo);
|
|
@@ -699,15 +906,56 @@ export default {
|
|
|
699
906
|
}
|
|
700
907
|
}
|
|
701
908
|
|
|
909
|
+
.title-group {
|
|
910
|
+
margin-bottom: 8px;
|
|
911
|
+
}
|
|
912
|
+
|
|
702
913
|
.title {
|
|
914
|
+
flex: 1;
|
|
915
|
+
min-width: 0;
|
|
703
916
|
text-align: left;
|
|
704
917
|
line-height: 1.3em !important;
|
|
705
918
|
font-size: 18px;
|
|
706
919
|
font-weight: bold;
|
|
707
|
-
padding-bottom: 8px;
|
|
708
920
|
color: $app-primary-color;
|
|
709
921
|
}
|
|
710
922
|
|
|
923
|
+
.title--clamped {
|
|
924
|
+
display: -webkit-box;
|
|
925
|
+
-webkit-line-clamp: 5;
|
|
926
|
+
line-clamp: 5;
|
|
927
|
+
-webkit-box-orient: vertical;
|
|
928
|
+
overflow: hidden;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.title-toggle {
|
|
932
|
+
flex-shrink: 0;
|
|
933
|
+
display: inline-flex;
|
|
934
|
+
align-items: center;
|
|
935
|
+
gap: 2px;
|
|
936
|
+
border: 0;
|
|
937
|
+
background: transparent;
|
|
938
|
+
padding: 0;
|
|
939
|
+
margin-top: 2px;
|
|
940
|
+
color: $app-primary-color;
|
|
941
|
+
text-decoration: underline;
|
|
942
|
+
font-size: 12px;
|
|
943
|
+
font-weight: 600;
|
|
944
|
+
line-height: 1.3;
|
|
945
|
+
cursor: pointer;
|
|
946
|
+
white-space: nowrap;
|
|
947
|
+
opacity: 0.65;
|
|
948
|
+
transition: opacity 0.2s ease;
|
|
949
|
+
|
|
950
|
+
&:hover {
|
|
951
|
+
opacity: 1;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
.title-toggle-icon {
|
|
955
|
+
font-size: 10px;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
|
|
711
959
|
.block + .block {
|
|
712
960
|
margin-top: 0.5em;
|
|
713
961
|
}
|
|
@@ -875,7 +1123,7 @@ export default {
|
|
|
875
1123
|
}
|
|
876
1124
|
}
|
|
877
1125
|
|
|
878
|
-
.population-
|
|
1126
|
+
.population-details {
|
|
879
1127
|
display: flex;
|
|
880
1128
|
flex: 1 1 auto !important;
|
|
881
1129
|
flex-direction: row !important;
|
|
@@ -883,20 +1131,27 @@ export default {
|
|
|
883
1131
|
justify-content: space-between;
|
|
884
1132
|
border-bottom: 1px solid $app-primary-color;
|
|
885
1133
|
padding-bottom: 0.5rem !important;
|
|
886
|
-
|
|
887
1134
|
flex-direction: column !important;
|
|
888
1135
|
align-items: start;
|
|
889
1136
|
|
|
1137
|
+
&.flex-row {
|
|
1138
|
+
flex-direction: row !important;
|
|
1139
|
+
align-items: center;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
890
1142
|
.buttons-row {
|
|
891
1143
|
display: flex;
|
|
892
1144
|
flex-direction: row;
|
|
893
1145
|
align-items: center;
|
|
894
1146
|
justify-content: space-between;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
&:not(.flex-row) .buttons-row {
|
|
895
1150
|
width: 100%;
|
|
896
1151
|
}
|
|
897
1152
|
}
|
|
898
1153
|
|
|
899
|
-
.population-
|
|
1154
|
+
.population-details-source {
|
|
900
1155
|
text-align: left;
|
|
901
1156
|
|
|
902
1157
|
.el-radio,
|
|
@@ -919,10 +1174,68 @@ export default {
|
|
|
919
1174
|
}
|
|
920
1175
|
}
|
|
921
1176
|
|
|
922
|
-
.population-
|
|
1177
|
+
.population-details-view {
|
|
923
1178
|
.el-button + .el-button {
|
|
924
1179
|
margin-left: 0.5rem !important;
|
|
925
1180
|
}
|
|
1181
|
+
|
|
1182
|
+
&.align-right {
|
|
1183
|
+
margin-left: auto;
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
.connectivity-legends {
|
|
1188
|
+
display: flex;
|
|
1189
|
+
flex-direction: column;
|
|
1190
|
+
gap: 0.5rem;
|
|
1191
|
+
margin-top: 0.75rem;
|
|
1192
|
+
|
|
1193
|
+
.legend-title {
|
|
1194
|
+
font-size: 12px;
|
|
1195
|
+
font-weight: 600;
|
|
1196
|
+
line-height: 1.2;
|
|
1197
|
+
color: var(--el-text-color-primary);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
.legend-item {
|
|
1201
|
+
display: flex;
|
|
1202
|
+
align-items: flex-start;
|
|
1203
|
+
gap: 0.375rem;
|
|
1204
|
+
font-size: 12px;
|
|
1205
|
+
line-height: 1.2;
|
|
1206
|
+
color: var(--el-text-color-regular);
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
.legend-color {
|
|
1210
|
+
display: inline-block;
|
|
1211
|
+
width: 12px;
|
|
1212
|
+
height: 12px;
|
|
1213
|
+
flex: 0 0 12px;
|
|
1214
|
+
border-left: 2px solid;
|
|
1215
|
+
|
|
1216
|
+
&.mapped {
|
|
1217
|
+
background-color: rgba($app-primary-color, 0.04);
|
|
1218
|
+
border-left-color: rgba($app-primary-color, 0.16);
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
&.unavailable {
|
|
1222
|
+
background-color: #ffe5e3;
|
|
1223
|
+
border-left-color: #ffb7b4;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
&.differ {
|
|
1227
|
+
background: linear-gradient(
|
|
1228
|
+
90deg,
|
|
1229
|
+
#ffe5e3 0%,
|
|
1230
|
+
#ffe5e3 calc(50% - 1px),
|
|
1231
|
+
#7fe09c calc(50% - 1px),
|
|
1232
|
+
#7fe09c calc(50% + 1px),
|
|
1233
|
+
#d9ffe0 calc(50% + 1px),
|
|
1234
|
+
#d9ffe0 100%
|
|
1235
|
+
);
|
|
1236
|
+
border-left-color: #ffb7b4;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
926
1239
|
}
|
|
927
1240
|
|
|
928
1241
|
.tooltip-container {
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
:envVars="envVars"
|
|
53
53
|
:connectivityEntry="connectivityEntry"
|
|
54
54
|
:availableAnatomyFacets="availableAnatomyFacets"
|
|
55
|
+
:showLongLabel="showLongLabel"
|
|
55
56
|
@filter-visibility="$emit('filter-visibility', $event)"
|
|
56
57
|
:connectivityFilterOptions="filterOptions"
|
|
57
58
|
:showVisibilityFilter="showVisibilityFilter"
|
|
@@ -195,7 +196,11 @@ export default {
|
|
|
195
196
|
showVisibilityFilter: {
|
|
196
197
|
type: Boolean,
|
|
197
198
|
default: false,
|
|
198
|
-
}
|
|
199
|
+
},
|
|
200
|
+
showLongLabel: {
|
|
201
|
+
type: Boolean,
|
|
202
|
+
default: false,
|
|
203
|
+
},
|
|
199
204
|
},
|
|
200
205
|
data: function () {
|
|
201
206
|
return {
|