@abi-software/map-side-bar 2.6.4-beta.4 → 2.6.4-beta.6
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 +49 -36
- package/dist/map-side-bar.umd.cjs +6 -6
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/ConnectivityInfo.vue +24 -5
- package/src/components/SideBar.vue +8 -0
- package/src/components/Tabs.vue +1 -1
- package/src/exampleConnectivityInput.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/map-side-bar",
|
|
3
|
-
"version": "2.6.4-beta.
|
|
3
|
+
"version": "2.6.4-beta.6",
|
|
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.3.3-beta.
|
|
42
|
+
"@abi-software/map-utilities": "^1.3.3-beta.5",
|
|
43
43
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
44
44
|
"@element-plus/icons-vue": "^2.3.1",
|
|
45
45
|
"algoliasearch": "^4.10.5",
|
|
@@ -219,7 +219,11 @@
|
|
|
219
219
|
</div>
|
|
220
220
|
|
|
221
221
|
<div class="content-container content-container-references" v-if="resources.length">
|
|
222
|
-
<external-resource-card
|
|
222
|
+
<external-resource-card
|
|
223
|
+
:resources="resources"
|
|
224
|
+
@references-loaded="onReferencesLoaded"
|
|
225
|
+
@show-reference-connectivities="onShowReferenceConnectivities"
|
|
226
|
+
></external-resource-card>
|
|
223
227
|
</div>
|
|
224
228
|
</div>
|
|
225
229
|
</template>
|
|
@@ -430,6 +434,9 @@ export default {
|
|
|
430
434
|
const name = data.map(t => t.label).join(', ');
|
|
431
435
|
this.toggleConnectivityTooltip(name, {show: true});
|
|
432
436
|
},
|
|
437
|
+
onShowReferenceConnectivities: function (refSource) {
|
|
438
|
+
this.$emit('show-reference-connectivities', refSource);
|
|
439
|
+
},
|
|
433
440
|
onReferencesLoaded: function (references) {
|
|
434
441
|
this.updatedCopyContent = this.getUpdateCopyContent(references);
|
|
435
442
|
},
|
|
@@ -444,12 +451,24 @@ export default {
|
|
|
444
451
|
// to avoid default formatting on font size and margin
|
|
445
452
|
|
|
446
453
|
// Title
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
454
|
+
let title = this.entry.title;
|
|
455
|
+
let featureId = this.entry.featureId;
|
|
456
|
+
const titleContent = [];
|
|
457
|
+
|
|
458
|
+
if (title) {
|
|
459
|
+
titleContent.push(`<strong>${capitalise(this.entry.title)}</strong>`);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if (featureId?.length) {
|
|
463
|
+
if (typeof featureId === 'object') {
|
|
464
|
+
titleContent.push(`(${featureId[0]})`);
|
|
465
|
+
} else {
|
|
466
|
+
titleContent.push(`(${featureId})`);
|
|
467
|
+
}
|
|
451
468
|
}
|
|
452
469
|
|
|
470
|
+
contentArray.push(`<div>${titleContent.join(' ')}</div>`);
|
|
471
|
+
|
|
453
472
|
// Description
|
|
454
473
|
if (this.entry.provenanceTaxonomyLabel?.length) {
|
|
455
474
|
contentArray.push(`<div>${this.provSpeciesDescription}</div>`);
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
:ref="'connectivityTab_' + tab.id"
|
|
40
40
|
:useDOIFormatter="useDOIFormatter"
|
|
41
41
|
@show-connectivity="showConnectivity"
|
|
42
|
+
@show-reference-connectivities="onShowReferenceConnectivities"
|
|
42
43
|
@connectivity-component-click="onConnectivityComponentClick"
|
|
43
44
|
/>
|
|
44
45
|
</template>
|
|
@@ -198,6 +199,13 @@ export default {
|
|
|
198
199
|
showConnectivity: function (featureIds) {
|
|
199
200
|
this.$emit('show-connectivity', featureIds);
|
|
200
201
|
},
|
|
202
|
+
/**
|
|
203
|
+
* This event is emitted when the show related connectivities button in reference is clicked.
|
|
204
|
+
* @param refSource
|
|
205
|
+
*/
|
|
206
|
+
onShowReferenceConnectivities: function (refSource) {
|
|
207
|
+
this.$emit('show-reference-connectivities', refSource);
|
|
208
|
+
},
|
|
201
209
|
/**
|
|
202
210
|
* This function is triggered after a connectivity component is clicked.
|
|
203
211
|
* @arg data
|
package/src/components/Tabs.vue
CHANGED