@abi-software/mapintegratedvuer 1.12.0 → 1.12.2

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/mapintegratedvuer",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "serve": "vite --host --force",
@@ -52,14 +52,14 @@
52
52
  "*.js"
53
53
  ],
54
54
  "dependencies": {
55
- "@abi-software/flatmapvuer": "1.11.0",
56
- "@abi-software/map-side-bar": "2.10.0",
57
- "@abi-software/map-utilities": "1.7.0",
58
- "@abi-software/plotvuer": "1.0.4",
59
- "@abi-software/scaffoldvuer": "1.11.0",
60
- "@abi-software/simulationvuer": "2.0.14",
55
+ "@abi-software/flatmapvuer": "1.11.2",
56
+ "@abi-software/map-side-bar": "2.10.3",
57
+ "@abi-software/map-utilities": "1.7.1",
58
+ "@abi-software/plotvuer": "1.0.5",
59
+ "@abi-software/scaffoldvuer": "1.11.3",
60
+ "@abi-software/simulationvuer": "2.0.17",
61
61
  "@abi-software/sparc-annotation": "0.3.2",
62
- "@abi-software/svg-sprite": "^1.0.1",
62
+ "@abi-software/svg-sprite": "1.0.2",
63
63
  "@element-plus/icons-vue": "^2.3.1",
64
64
  "@vitejs/plugin-vue": "^4.6.2",
65
65
  "css-element-queries": "^1.2.3",
@@ -140,8 +140,5 @@
140
140
  "browserslist": [
141
141
  "> 1%",
142
142
  "last 2 versions"
143
- ],
144
- "engines": {
145
- "node": "18.17.1"
146
- }
143
+ ]
147
144
  }
@@ -98,6 +98,7 @@ import {
98
98
  ElRow as Row,
99
99
  ElSelect as Select,
100
100
  } from "element-plus";
101
+ import tagging from '../services/tagging';
101
102
 
102
103
  export default {
103
104
  name: "ContentBar",
@@ -251,6 +252,15 @@ export default {
251
252
  }, 1200);
252
253
  });
253
254
  //this.contextCardVisible = false; // Hide all context cards when switching viewers
255
+
256
+ // GA Tracking
257
+ const viewCategory = this.entries.find(entry => entry.id === value);
258
+ tagging.sendEvent({
259
+ 'event': 'interaction_event',
260
+ 'event_name': `portal_maps_toolbar_viewer_changed`,
261
+ 'category': viewCategory?.title || '',
262
+ 'location': 'map_toolbar'
263
+ });
254
264
  }
255
265
  },
256
266
  // setPopper with is needed as the flatmap context card does not have an image and has smaller with
@@ -13,6 +13,31 @@
13
13
  </div>
14
14
  </div>
15
15
  <div class="card-bottom">
16
+ <div v-loading="loadingOriginalSource">
17
+ <el-collapse v-if="originalSource && originalSource.length" v-model="activeName">
18
+ <el-collapse-item title="View/Hide source data links" name="sourceDataLinks">
19
+ <ul class="source-data-list">
20
+ <template v-for="(source, i) in originalSource" :key="'source-'+ i">
21
+ <li>
22
+ <a v-if="source && source.path" :href="generateFileLink(source)" target="_blank">View {{source.name}}</a>
23
+ </li>
24
+ </template>
25
+ </ul>
26
+ </el-collapse-item>
27
+ </el-collapse>
28
+ </div>
29
+ <div v-if="flatmapSource && flatmapSource.length" class="flatmap-entry">
30
+ Associated flatmaps from source:
31
+ <ul class="source-data-list">
32
+ <template v-for="(source, i) in flatmapSource" :key="'flatmap-' + i">
33
+ <li>
34
+ <span @click="flatmapClick(source)">
35
+ For {{ source.name }}
36
+ </span>
37
+ </li>
38
+ </template>
39
+ </ul>
40
+ </div>
16
41
  <div>
17
42
  <!-- Show sampeles and views seperately if they do not match -->
18
43
  <template v-if="!samplesUnderViews">
@@ -63,7 +88,7 @@
63
88
 
64
89
  <!-- Copy to clipboard button container -->
65
90
  <div class="float-button-container">
66
- <CopyToClipboard :content="updatedCopyContent" theme="light" />
91
+ <CopyToClipboard :content="copyContent" @copied="onCopied" theme="light" />
67
92
  </div>
68
93
  </div>
69
94
  </div>
@@ -73,10 +98,13 @@
73
98
  <script>
74
99
  /* eslint-disable no-alert, no-console */
75
100
  import { CopyToClipboard } from "@abi-software/map-utilities";
101
+ import { mapStores } from 'pinia';
102
+ import tagging from '../services/tagging';
76
103
  import '@abi-software/map-utilities/dist/style.css';
77
-
104
+ import EventBus from './EventBus';
78
105
  //provide the s3Bucket related methods and data.
79
106
  import S3Bucket from "../mixins/S3Bucket.vue";
107
+ import { useSettingsStore } from '../stores/settings';
80
108
 
81
109
  import { marked } from 'marked'
82
110
  import xss from 'xss'
@@ -123,6 +151,11 @@ export default {
123
151
  showContextCard: true,
124
152
  sampleDetails: {},
125
153
  loading: false,
154
+ loadingOriginalSource: true,
155
+ originalSource: [],
156
+ flatmapSource: [],
157
+ activeName: "",
158
+ copyContent: "",
126
159
  };
127
160
  },
128
161
  watch: {
@@ -150,6 +183,10 @@ export default {
150
183
  }
151
184
  },
152
185
  computed: {
186
+ ...mapStores(useSettingsStore),
187
+ flatmapAPI: function() {
188
+ return this.settingsStore.flatmapAPI;
189
+ },
153
190
  samplesUnderViews: function(){
154
191
  if (this.contextData){
155
192
  if (this.contextData.samplesUnderViews){
@@ -179,7 +216,17 @@ export default {
179
216
  }
180
217
  return this.entry.banner
181
218
  },
182
- updatedCopyContent: function () {
219
+ },
220
+ methods: {
221
+ flatmapClick: function(source) {
222
+ const newView = {
223
+ type: "Flatmap",
224
+ resource: source.flatmapUUID,
225
+ label: this.contextData.heading
226
+ };
227
+ EventBus.emit("CreateNewEntry", newView);
228
+ },
229
+ updateCopyContent: function () {
183
230
  const contentArray = [];
184
231
 
185
232
  // Use <div> instead of <h1>..<h6> or <p>
@@ -193,6 +240,40 @@ export default {
193
240
  contentArray.push(`<div>${this.contextData.description}</div>`);
194
241
  }
195
242
 
243
+ if (this.originalSource && this.originalSource.length) {
244
+ let sourceDataLinks = '<div><strong>Source data links</strong></div>';
245
+ const sourceLinks = [];
246
+
247
+ this.originalSource.forEach((source, i) => {
248
+ const path = this.generateFileLink(source);
249
+ let sourceContent = `<div>${source.name}</div>`;
250
+ sourceContent += `\n`;
251
+ sourceContent += `<div><a href="${path}">${path}</a></div>`;
252
+ sourceLinks.push(`<li>${sourceContent}</li>`);
253
+ });
254
+ sourceDataLinks += '\n\n';
255
+ sourceDataLinks += `<ul>${sourceLinks.join('\n')}</ul>`;
256
+ contentArray.push(sourceDataLinks);
257
+ }
258
+
259
+ if (this.flatmapSource && this.flatmapSource.length) {
260
+ let flatmapDataLinks = '<div><strong>Associated flatmaps from source</strong></div>';
261
+ const flatmapLinks = [];
262
+
263
+ this.flatmapSource.forEach((source, i) => {
264
+ const path = this.generateFileLink(source);
265
+ let flatmapContent = `<div>${source.name}</div>`;
266
+ let flatmapSource = this.flatmapAPI ?
267
+ `${this.flatmapAPI}viewer?id=${source.flatmapUUID}` : source.flatmapUUID;
268
+ flatmapContent += `\n`;
269
+ flatmapContent += `<div><a href="${flatmapSource}">${flatmapSource}</a></div>`;
270
+ flatmapLinks.push(`<li>${flatmapContent}</li>`);
271
+ });
272
+ flatmapDataLinks += '\n\n';
273
+ flatmapDataLinks += `<ul>${flatmapLinks.join('\n')}</ul>`;
274
+ contentArray.push(flatmapDataLinks);
275
+ }
276
+
196
277
  if (this.contextData.views?.length) {
197
278
  let scaffoldViews = '<div><strong>Scaffold Views</strong></div>';
198
279
  const views = [];
@@ -249,8 +330,6 @@ export default {
249
330
 
250
331
  return contentArray.join('\n\n<br>');
251
332
  },
252
- },
253
- methods: {
254
333
  samplesMatching: function(viewId){
255
334
  if (this.contextData && this.contextData.samples){
256
335
  return this.contextData.samples.filter(s=>s.view == viewId)[0]
@@ -279,7 +358,6 @@ export default {
279
358
  .catch((err) => {
280
359
  //set defaults if we hit an error
281
360
  console.error('caught error!', err)
282
- this.discoverId = undefined
283
361
  this.loading = false
284
362
  });
285
363
  },
@@ -335,7 +413,7 @@ export default {
335
413
  },
336
414
  generateFileLink(sample){
337
415
  const path = this.processPathForUrl(sample.path);
338
- let link = `${this.envVars.ROOT_URL}/file/${sample.discoverId}/${sample.version}` + '?path=';
416
+ let link = `${this.envVars.ROOT_URL}/datasets/file/${sample.discoverId}/${sample.version}` + '?path=';
339
417
  link = link + path;
340
418
  return link;
341
419
  },
@@ -348,7 +426,63 @@ export default {
348
426
  // note that we assume that the view file is in the same directory as the scaffold (viewUrls take relative paths)
349
427
  const viewUrl = this.getFileFromPath(view.path)
350
428
  this.$emit("scaffold-view-clicked", viewUrl);
429
+ },
430
+ getOriginalSource: function() {
431
+ const discoverId = this.entry.discoverId
432
+ const filesPos = 'files/'.length
433
+ const path = this.entry.resource.substring(
434
+ this.entry.resource.indexOf("files/") + filesPos,
435
+ this.entry.resource.lastIndexOf("?"))
436
+ const params = new URLSearchParams({
437
+ discoverId,
438
+ path
439
+ });
440
+ const url = `${this.envVars.API_LOCATION}/file_info/get_original_source?${params.toString()}`
441
+ fetch(url)
442
+ .then((response) =>{
443
+ if (!response.ok){
444
+ throw Error(response.statusText)
445
+ } else {
446
+ return response.json()
447
+ }
448
+ })
449
+ .then((data) => {
450
+ this.loadingOriginalSource = false
451
+ if (data.result) {
452
+ data.result.forEach(result => {
453
+ if (result.flatmapUUID) {
454
+ this.flatmapSource.push(result)
455
+ } else {
456
+ this.originalSource.push(result)
457
+ }
458
+ })
459
+ if (this.flatmapSource.length || this.originalSource.length) {
460
+ this.copyContent = this.updateCopyContent()
461
+ }
462
+ }
463
+ this.loadingOriginalSource = false
464
+ })
465
+ .catch((err) => {
466
+ //set defaults if we hit an error
467
+ console.error('caught error!', err)
468
+ this.loadingOriginalSource = false
469
+ });
470
+ },
471
+ onCopied: function () {
472
+ const { label, type, discoverId } = this.entry;
473
+ const category = type ? `${label} ${type}` : label;
474
+ tagging.sendEvent({
475
+ 'event': 'interaction_event',
476
+ 'event_name': `portal_maps_context_card_copy`,
477
+ 'category': category || '',
478
+ 'location': 'map_toolbar',
479
+ 'dataset_id': discoverId ? discoverId + '' : '',
480
+ });
351
481
  }
482
+ },
483
+ mounted: function() {
484
+ this.copyContent = this.updateCopyContent()
485
+ this.getOriginalSource()
352
486
  }
353
487
  };
354
488
  </script>
@@ -494,4 +628,19 @@ export default {
494
628
  visibility: visible;
495
629
  }
496
630
  }
631
+
632
+ .flatmap-entry {
633
+ margin-top: 16px;
634
+ }
635
+
636
+ .source-data-list {
637
+ a {
638
+ color: #8300BF;
639
+ }
640
+ span {
641
+ color: #8300BF;
642
+ text-decoration: underline;
643
+ cursor: pointer;
644
+ }
645
+ }
497
646
  </style>
@@ -87,7 +87,7 @@
87
87
  <template #reference>
88
88
  <el-checkbox
89
89
  v-model="globalSettings.displayMarkers"
90
- @change="updateGlobalSettings"
90
+ @change="updateGlobalSettings('displayMarkers')"
91
91
  size="small"
92
92
  :disabled="globalSettings.viewingMode !== 'Exploration'"
93
93
  >
@@ -101,7 +101,7 @@
101
101
  <div class="setting-popover-block" v-if="'connectionType' in globalSettings">
102
102
  <el-radio-group
103
103
  v-model="globalSettings.connectionType"
104
- @change="updateGlobalSettings"
104
+ @change="updateGlobalSettings('connectionType')"
105
105
  >
106
106
  <el-radio-button value="Origin" size="small">Origin</el-radio-button>
107
107
  <el-radio-button value="Via" size="small">Via</el-radio-button>
@@ -306,7 +306,7 @@
306
306
  <!-- <div class="setting-popover-block" v-if="'displayMarkers' in globalSettings">
307
307
  <el-checkbox
308
308
  v-model="globalSettings.displayMarkers"
309
- @change="updateGlobalSettings"
309
+ @change="updateGlobalSettings('displayMarkers')"
310
310
  >
311
311
  Display Map Markers
312
312
  </el-checkbox>
@@ -316,14 +316,14 @@
316
316
  <el-checkbox
317
317
  v-if="'highlightConnectedPaths' in globalSettings"
318
318
  v-model="globalSettings.highlightConnectedPaths"
319
- @change="updateGlobalSettings"
319
+ @change="updateGlobalSettings('highlightConnectedPaths')"
320
320
  >
321
321
  Highlight Connected Paths
322
322
  </el-checkbox>
323
323
  <el-checkbox
324
324
  v-if="'highlightDOIPaths' in globalSettings"
325
325
  v-model="globalSettings.highlightDOIPaths"
326
- @change="updateGlobalSettings"
326
+ @change="updateGlobalSettings('highlightDOIPaths')"
327
327
  >
328
328
  Highlight DOI Paths
329
329
  </el-checkbox>
@@ -332,7 +332,7 @@
332
332
  <h5>Interactive Mode</h5>
333
333
  <el-radio-group
334
334
  v-model="globalSettings.interactiveMode"
335
- @change="updateGlobalSettings"
335
+ @change="updateGlobalSettings('interactiveMode')"
336
336
  >
337
337
  <el-radio value="dataset">Dataset Exploration</el-radio>
338
338
  <el-radio value="connectivity">Connectivity Exploration</el-radio>
@@ -344,7 +344,7 @@
344
344
  <h5>Flight path</h5>
345
345
  <el-radio-group
346
346
  v-model="globalSettings.flightPathDisplay"
347
- @change="updateGlobalSettings"
347
+ @change="updateGlobalSettings('flightPathDisplay')"
348
348
  >
349
349
  <el-radio :value="false">2D</el-radio>
350
350
  <el-radio :value="true">3D</el-radio>
@@ -354,7 +354,7 @@
354
354
  <h5>Organs</h5>
355
355
  <el-radio-group
356
356
  v-model="globalSettings.organsDisplay"
357
- @change="updateGlobalSettings"
357
+ @change="updateGlobalSettings('organsDisplay')"
358
358
  >
359
359
  <el-radio :value="true">Color</el-radio>
360
360
  <el-radio :value="false">Grayscale</el-radio>
@@ -364,7 +364,7 @@
364
364
  <h5>Apply outlines</h5>
365
365
  <el-radio-group
366
366
  v-model="globalSettings.outlinesDisplay"
367
- @change="updateGlobalSettings"
367
+ @change="updateGlobalSettings('outlinesDisplay')"
368
368
  >
369
369
  <el-radio :value="true">Show</el-radio>
370
370
  <el-radio :value="false">Hide</el-radio>
@@ -375,7 +375,7 @@
375
375
  <el-radio-group
376
376
  class="bg-color-radio-group"
377
377
  v-model="globalSettings.backgroundDisplay"
378
- @change="updateGlobalSettings"
378
+ @change="updateGlobalSettings('backgroundDisplay')"
379
379
  >
380
380
  <el-radio value="white" class="bg-color-radio">
381
381
  <span style="--bg-color: white">white</span>
@@ -443,6 +443,7 @@ import {
443
443
  ElRadioGroup as RadioGroup,
444
444
  ElRow as Row,
445
445
  } from "element-plus";
446
+ import tagging from '../services/tagging';
446
447
 
447
448
  /**
448
449
  * Cmponent for the header of differnt vuers.
@@ -551,10 +552,10 @@ export default {
551
552
  this.globalSettings.interactiveMode = 'connectivity';
552
553
  }
553
554
 
554
- this.updateGlobalSettings();
555
+ this.updateGlobalSettings('viewingMode');
555
556
  }
556
557
  },
557
- updateGlobalSettings: function() {
558
+ updateGlobalSettings: function(changedKey) {
558
559
  const updatedSettings = this.settingsStore.getUpdatedGlobalSettingsKey(this.globalSettings);
559
560
  this.settingsStore.updateGlobalSettings(this.globalSettings);
560
561
 
@@ -574,20 +575,71 @@ export default {
574
575
  updatedSettings.includes('backgroundDisplay')) {
575
576
  EventBus.emit('globalViewerSettingsUpdate');
576
577
  }
578
+
579
+ // GA Tracking
580
+ let category = this.globalSettings[changedKey];
581
+
582
+ // Format category for some items
583
+ if (changedKey === 'flightPathDisplay') {
584
+ category = this.globalSettings.flightPathDisplay ? '3D' : '2D';
585
+ }
586
+ if (changedKey === 'organsDisplay') {
587
+ category = this.globalSettings.organsDisplay ? 'Color': 'Grayscale';
588
+ }
589
+ if (changedKey === 'outlinesDisplay') {
590
+ category = this.globalSettings.outlinesDisplay ? 'Show' : 'Hide';
591
+ }
592
+
593
+ // Prevent viewing mode clicks on active item
594
+ if (updatedSettings.length) {
595
+ tagging.sendEvent({
596
+ 'event': 'interaction_event',
597
+ 'event_name': `portal_maps_settings_${changedKey}`,
598
+ 'category': category,
599
+ 'location': 'map_toolbar'
600
+ });
601
+ }
577
602
  },
578
603
  titleClicked: function(id) {
579
604
  this.$emit("titleClicked", id);
580
605
  },
581
606
  startHelp: function(){
582
607
  EventBus.emit("startHelp");
608
+
609
+ // GA Tracking
610
+ tagging.sendEvent({
611
+ 'event': 'interaction_event',
612
+ 'event_name': `portal_maps_toolbar_help`,
613
+ 'category': 'help_mode_start',
614
+ 'location': 'map_toolbar'
615
+ });
583
616
  },
584
617
  onFullscreen: function() {
585
618
  this.$emit("onFullscreen");
586
619
  this.isFullscreen = !this.isFullscreen;
620
+
621
+ // GA Tracking
622
+ // only for fullscreen enter event to prevent duplicate events
623
+ if (this.isFullscreen) {
624
+ tagging.sendEvent({
625
+ 'event': 'interaction_event',
626
+ 'event_name': `portal_maps_toolbar_fullscreen`,
627
+ 'category': this.isFullscreen ? 'enter' : 'exit',
628
+ 'location': 'map_toolbar'
629
+ });
630
+ }
587
631
  },
588
632
  onFullscreenEsc: function () {
589
633
  if (!document.fullscreenElement) {
590
634
  this.isFullscreen = false;
635
+
636
+ // GA Tracking
637
+ tagging.sendEvent({
638
+ 'event': 'interaction_event',
639
+ 'event_name': `portal_maps_toolbar_fullscreen`,
640
+ 'category': this.isFullscreen ? 'enter' : 'exit',
641
+ 'location': 'map_toolbar'
642
+ });
591
643
  }
592
644
  },
593
645
  close: function() {
@@ -597,6 +649,14 @@ export default {
597
649
  if (document) {
598
650
  this.$refs.linkInput.$el.querySelector("input").select();
599
651
  document.execCommand('copy');
652
+
653
+ // GA Tracking
654
+ tagging.sendEvent({
655
+ 'event': 'interaction_event',
656
+ 'event_name': 'portal_maps_permalink',
657
+ 'category': 'permalink_copy',
658
+ 'location': 'map_toolbar'
659
+ });
600
660
  }
601
661
  },
602
662
  setFailedSearch: function(result) {
@@ -613,13 +673,34 @@ export default {
613
673
  this.displayShareOptions = false;
614
674
  this.loadingLink = true;
615
675
  EventBus.emit("updateShareLinkRequested", withAnnotation);
676
+
677
+ // GA Tracking
678
+ tagging.sendEvent({
679
+ 'event': 'interaction_event',
680
+ 'event_name': 'portal_maps_permalink',
681
+ 'category': 'permalink_generate',
682
+ 'location': 'map_toolbar'
683
+ });
616
684
  },
617
685
  viewClicked: function(view) {
686
+ const prevActiveView = this.activeView;
687
+
618
688
  this.splitFlowStore.updateActiveView({
619
689
  view,
620
690
  entries: this.entriesStore.entries,
621
691
  });
622
692
 
693
+ // GA Tracking
694
+ if (view !== prevActiveView) {
695
+ const viewCategory = this.viewIcons.find((item) => item.icon === view);
696
+ tagging.sendEvent({
697
+ 'event': 'interaction_event',
698
+ 'event_name': `portal_maps_toolbar_split_view`,
699
+ 'category': viewCategory?.name || '',
700
+ 'location': 'map_toolbar'
701
+ });
702
+ }
703
+
623
704
  if (this.$refs.viewPopover) {
624
705
  this.$refs.viewPopover.hide();
625
706
  }
@@ -13,7 +13,7 @@
13
13
 
14
14
  <!-- Copy to clipboard button container -->
15
15
  <div class="float-button-container">
16
- <CopyToClipboard :content="updatedCopyContent" theme="light" />
16
+ <CopyToClipboard :content="updatedCopyContent" @copied="onCopied" theme="light" />
17
17
  </div>
18
18
  </div>
19
19
  </template>
@@ -25,6 +25,7 @@ import {
25
25
  ElLoading as Loading
26
26
  } from "element-plus";
27
27
  import { CopyToClipboard } from "@abi-software/map-utilities";
28
+ import tagging from '../services/tagging';
28
29
  import '@abi-software/map-utilities/dist/style.css';
29
30
 
30
31
  export default {
@@ -64,15 +65,17 @@ export default {
64
65
  sckanReleaseDisplay: function() {
65
66
  let sckanRelease = "Unknown"
66
67
  if(this.mapImpProv){
67
- sckanRelease = this.mapImpProv.connectivity?.npo.date
68
+ sckanRelease = this.mapImpProv.connectivity?.npo?.date
68
69
  if (!sckanRelease) {
69
70
  let sckanCreated = this.mapImpProv.sckan?.created ? this.mapImpProv.sckan.created : this.mapImpProv.sckan
70
- let isoTime = sckanCreated.replace(',', '.') // Date time does not accept commas but Sckan uses them
71
- sckanRelease = new Date(isoTime).toLocaleDateString('en-US', {
72
- day: '2-digit',
73
- month: 'long',
74
- year: 'numeric',
75
- })
71
+ if (sckanCreated) {
72
+ let isoTime = sckanCreated.replace(',', '.') // Date time does not accept commas but Sckan uses them
73
+ sckanRelease = new Date(isoTime).toLocaleDateString('en-US', {
74
+ day: '2-digit',
75
+ month: 'long',
76
+ year: 'numeric',
77
+ })
78
+ }
76
79
  }
77
80
  if (!sckanRelease) {
78
81
  sckanRelease = "Unknown";
@@ -83,7 +86,7 @@ export default {
83
86
  sckanReleaseLink: function() {
84
87
  let sckanLink = "Unknown"
85
88
  if(this.mapImpProv){
86
- sckanLink = this.mapImpProv.connectivity?.npo.path
89
+ sckanLink = this.mapImpProv.connectivity?.npo?.path
87
90
  if (!sckanLink) {
88
91
  sckanLink = this.mapImpProv.sckan?.release
89
92
  }
@@ -126,6 +129,16 @@ export default {
126
129
  return contentArray.join('\n\n<br>');
127
130
  },
128
131
  },
132
+ methods: {
133
+ onCopied: function () {
134
+ tagging.sendEvent({
135
+ 'event': 'interaction_event',
136
+ 'event_name': `portal_maps_context_card_copy`,
137
+ 'category': this.mapImpProv?.id || 'Flatmap Provenance',
138
+ 'location': 'map_toolbar'
139
+ });
140
+ },
141
+ },
129
142
  };
130
143
  </script>
131
144