@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-side-bar",
3
- "version": "2.6.4-beta.4",
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.2",
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 :resources="resources" :useDOIFormatter="useDOIFormatter" @references-loaded="onReferencesLoaded"></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
- if (this.entry.title) {
448
- contentArray.push(`<div><strong>${capitalise(this.entry.title)}</strong></div>`);
449
- } else {
450
- contentArray.push(`<div><strong>${this.entry.featureId}</strong></div>`);
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
@@ -58,7 +58,7 @@ export default {
58
58
  $tab-height: 30px;
59
59
 
60
60
  .tab-container {
61
- height: $tab-height;
61
+ height: $tab-height + 2;
62
62
  display: flex;
63
63
  flex-direction: row;
64
64
  position: relative;
@@ -287,4 +287,4 @@ export default {
287
287
  "Domestic Pig"
288
288
  ],
289
289
  "knowledge-source": "sckan-2024-03-26-npo",
290
- }
290
+ }