@abi-software/mapintegratedvuer 1.3.4-isan.2 → 1.3.5-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/mapintegratedvuer",
3
- "version": "1.3.4-isan.2",
3
+ "version": "1.3.5-beta.0",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "serve": "vite --host --force",
@@ -50,12 +50,12 @@
50
50
  "*.js"
51
51
  ],
52
52
  "dependencies": {
53
- "@abi-software/flatmapvuer": "1.3.2-isan.0",
54
- "@abi-software/map-side-bar": "^2.4.0-isan-2",
55
- "@abi-software/map-utilities": "^1.0.0",
53
+ "@abi-software/flatmapvuer": "^1.3.2",
54
+ "@abi-software/map-side-bar": "^2.3.2-beta.5",
55
+ "@abi-software/map-utilities": "^1.0.1-beta.3",
56
56
  "@abi-software/plotvuer": "1.0.0",
57
57
  "@abi-software/scaffoldvuer": "^1.3.3",
58
- "@abi-software/simulationvuer": "^2.0.5",
58
+ "@abi-software/simulationvuer": "1.0.0",
59
59
  "@abi-software/svg-sprite": "1.0.0",
60
60
  "@element-plus/icons-vue": "^2.3.1",
61
61
  "@pinia/testing": "^0.1.3",
package/src/App.vue CHANGED
@@ -95,7 +95,6 @@ export default {
95
95
  flatmapAPI: import.meta.env.VITE_FLATMAPAPI_LOCATION,
96
96
  nlLinkPrefix: import.meta.env.VITE_NL_LINK_PREFIX,
97
97
  rootUrl: import.meta.env.VITE_ROOT_URL,
98
- pmrHost: import.meta.env.VITE_PMR_HOST,
99
98
  }
100
99
  }
101
100
  },
@@ -166,7 +165,6 @@ export default {
166
165
  this.$refs.map.openSearch([], "10.26275/1uno-tynt");
167
166
  },
168
167
  mapIsReady: function() {
169
- if (!this.uuid) this.setFlatmap();
170
168
  console.log("map is ready")
171
169
  },
172
170
  parseQuery: function () {
@@ -16,7 +16,7 @@
16
16
  <div v-if="contextData.views && contextData.views.length > 0" class="subtitle">Scaffold Views</div>
17
17
  <template v-for="(view, i) in contextData.views" :key="i+'_1'">
18
18
  <div @click="openViewFile(view)" class="context-card-view">
19
- <img class="view-image" :src="getFileFromPath(view.thumbnail)">
19
+ <img class="view-image" :src="getFileFromPath(view.thumbnail)">
20
20
  <div class="view-description">{{view.description}}</div>
21
21
  </div>
22
22
  <div class="padding"/>
@@ -43,7 +43,7 @@
43
43
  <div v-if="contextData.views && contextData.views.length > 0" class="subtitle">Scaffold Views</div>
44
44
  <template v-for="(view, i) in contextData.views" :key="i+'_1'">
45
45
  <span @click="viewClicked(view, i)" class="context-card-view">
46
- <img class="view-image" :src="getFileFromPath(view.thumbnail)"/>
46
+ <img class="view-image" :src="getFileFromPath(view.thumbnail)"/>
47
47
  <div class="view-description">{{view.description}}<i class="el-icon-warning-outline info"></i> </div>
48
48
  </span>
49
49
  <div v-if="sampleDetails[i]" v-html="samplesMatching(view.id).description"/>
@@ -57,6 +57,11 @@
57
57
  </div>
58
58
  </div>
59
59
  </div>
60
+
61
+ <!-- Copy to clipboard button container -->
62
+ <div class="float-button-container">
63
+ <CopyToClipboard :content="updatedCopyContent" theme="light" />
64
+ </div>
60
65
  </div>
61
66
  </div>
62
67
  </template>
@@ -64,6 +69,8 @@
64
69
 
65
70
  <script>
66
71
  /* eslint-disable no-alert, no-console */
72
+ import { CopyToClipboard } from "@abi-software/map-utilities";
73
+ import '@abi-software/map-utilities/dist/style.css';
67
74
 
68
75
  //provide the s3Bucket related methods and data.
69
76
  import S3Bucket from "../mixins/S3Bucket.vue";
@@ -94,6 +101,9 @@ const convertBackslashToForwardSlash = function(path){
94
101
 
95
102
  export default {
96
103
  name: "contextCard",
104
+ components: {
105
+ CopyToClipboard,
106
+ },
97
107
  mixins: [S3Bucket],
98
108
  props: {
99
109
  /**
@@ -109,7 +119,7 @@ export default {
109
119
  showDetails: true,
110
120
  showContextCard: true,
111
121
  sampleDetails: {},
112
- loading: false
122
+ loading: false,
113
123
  };
114
124
  },
115
125
  watch: {
@@ -142,8 +152,8 @@ export default {
142
152
  if (this.contextData.samplesUnderViews){
143
153
  return true
144
154
  } else {
145
- let viewId = this.contextData.views.map(v=>v.id)
146
- let samplesView = this.contextData.samples.map(s=>s.view)
155
+ let viewId = this.contextData.views?.map(v=>v.id) || [];
156
+ let samplesView = this.contextData.samples?.map(s=>s.view) || [];
147
157
 
148
158
  // get matching values
149
159
  let matching = viewId.filter(v=>samplesView.includes(v))
@@ -152,21 +162,90 @@ export default {
152
162
  if ( viewId.length === matching.length && matching.length === samplesView.length){
153
163
  return true
154
164
  }
155
- return false
156
165
  }
157
166
  }
158
- else return false
167
+ return false;
159
168
  },
160
169
  banner: function(){
161
170
  if (this.contextData.banner){
162
- return this.getFileFromPath(this.contextData.banner)
171
+ return this.getFileFromPath(this.contextData.banner)
163
172
  } else if (this.contextData && this.contextData.views && this.contextData.views.length > 0) {
164
173
  if(this.contextData.views[0].thumbnail){
165
174
  return this.getFileFromPath(this.contextData.views[0].thumbnail)
166
175
  }
167
- }
176
+ }
168
177
  return this.entry.banner
169
- }
178
+ },
179
+ updatedCopyContent: function () {
180
+ const contentArray = [];
181
+
182
+ // Use <div> instead of <h1>..<h6> or <p>
183
+ // to avoid default formatting on font size and margin
184
+
185
+ if (this.contextData.heading) {
186
+ contentArray.push(`<div><strong>${this.contextData.heading}</strong></div>`);
187
+ }
188
+
189
+ if (this.contextData.description) {
190
+ contentArray.push(`<div>${this.contextData.description}</div>`);
191
+ }
192
+
193
+ if (this.contextData.views?.length) {
194
+ let scaffoldViews = '<div><strong>Scaffold Views</strong></div>';
195
+ const views = [];
196
+
197
+ this.contextData.views.forEach((view, i) => {
198
+ const viewContents = [];
199
+ const viewPath = this.getFileFromPath(view.path);
200
+ let viewContent = `<div>${view.description}</div>`;
201
+ viewContent += `\n`;
202
+ viewContent += `<div><a href="${viewPath}">${viewPath}</a></div>`;
203
+ viewContents.push(viewContent);
204
+
205
+ if (this.samplesUnderViews) {
206
+ const description = this.samplesMatching(view.id).description;
207
+ let sampleContent = `<div>${description}</div>`;
208
+
209
+ if (this.samplesMatching(view.id).path) {
210
+ sampleContent += `\n`;
211
+ const url = this.generateFileLink(this.samplesMatching(view.id));
212
+ sampleContent += `<div><a href="${url}">${url}</a></div>`;
213
+ }
214
+ viewContents.push(sampleContent);
215
+ }
216
+ const viewContentStr = viewContents.join('\n');
217
+ views.push(`<li>${viewContentStr}</li>`);
218
+ });
219
+ scaffoldViews += '\n\n';
220
+ scaffoldViews += `<ul>${views.join('\n')}</ul>`;
221
+ contentArray.push(scaffoldViews);
222
+ }
223
+
224
+ if (!this.samplesUnderViews) {
225
+ if (this.contextData.samples?.length) {
226
+ let sampleViews = '<div><strong>Samples on Scaffold</strong></div>';
227
+ const samples = [];
228
+
229
+ this.contextData.samples.forEach((sample, i) => {
230
+ let sampleContents = '';
231
+ sampleContents += `<div>${sample.heading}</div>`;
232
+ sampleContents += `\n`;
233
+ sampleContents += `<div>${sample.description}</div>`;
234
+ if (sample.path) {
235
+ const url = this.generateFileLink(sample);
236
+ sampleContents += `\n`;
237
+ sampleContents += `<div><a href="${url}">${url}</a></div>`;
238
+ }
239
+ samples.push(`<li>${sampleContents}</li>`);
240
+ });
241
+ sampleViews += '\n\n';
242
+ sampleViews += `<ul>${samples.join('\n')}</ul>`;
243
+ contentArray.push(sampleViews);
244
+ }
245
+ }
246
+
247
+ return contentArray.join('\n\n<br>');
248
+ },
170
249
  },
171
250
  methods: {
172
251
  samplesMatching: function(viewId){
@@ -176,7 +255,7 @@ export default {
176
255
  else return []
177
256
  },
178
257
  viewClicked: function(view, i){
179
- this.openViewFile(view)
258
+ this.openViewFile(view)
180
259
  this.toggleSampleDetails(i)
181
260
  },
182
261
  getContextFile: function (contextFileUrl) {
@@ -192,7 +271,7 @@ export default {
192
271
  .then((data) => {
193
272
  this.contextData = data
194
273
  this.loading = false
195
- this.addDiscoverIdsToContextData()
274
+ this.addDiscoverIdsToContextData()
196
275
  })
197
276
  .catch((err) => {
198
277
  //set defaults if we hit an error
@@ -382,4 +461,16 @@ export default {
382
461
  background-color: #979797;
383
462
  }
384
463
 
464
+ .float-button-container {
465
+ position: absolute;
466
+ bottom: 6px;
467
+ right: 12px;
468
+ opacity: 0;
469
+ visibility: hidden;
470
+
471
+ .context-card-container:hover & {
472
+ opacity: 1;
473
+ visibility: visible;
474
+ }
475
+ }
385
476
  </style>
@@ -10,6 +10,11 @@
10
10
  View publication <a :href="flatmapSource" target="_blank">here</a>
11
11
  <br/>
12
12
  </div>
13
+
14
+ <!-- Copy to clipboard button container -->
15
+ <div class="float-button-container">
16
+ <CopyToClipboard :content="copyContent" theme="light" />
17
+ </div>
13
18
  </div>
14
19
  </template>
15
20
 
@@ -19,11 +24,14 @@
19
24
  import {
20
25
  ElLoading as Loading
21
26
  } from "element-plus";
27
+ import { CopyToClipboard } from "@abi-software/map-utilities";
28
+ import '@abi-software/map-utilities/dist/style.css';
22
29
 
23
30
  export default {
24
31
  name: "FlatmapContextCard",
25
32
  components: {
26
33
  Loading,
34
+ CopyToClipboard,
27
35
  },
28
36
  props: {
29
37
  /**
@@ -38,7 +46,8 @@ export default {
38
46
  showDetails: true,
39
47
  showContextCard: true,
40
48
  sampleDetails: {},
41
- loading: false
49
+ loading: false,
50
+ copyContent: '',
42
51
  };
43
52
  },
44
53
  computed: {
@@ -51,7 +60,7 @@ export default {
51
60
  year: 'numeric',
52
61
  })
53
62
  }
54
- return flatmapPublished
63
+ return flatmapPublished
55
64
  },
56
65
  sckanReleaseDisplay: function() {
57
66
  let sckanRelease = "Unknown"
@@ -59,20 +68,18 @@ export default {
59
68
  sckanRelease = this.mapImpProv.connectivity?.npo.date
60
69
  if (!sckanRelease) {
61
70
  let sckanCreated = this.mapImpProv.sckan?.created ? this.mapImpProv.sckan.created : this.mapImpProv.sckan
62
- if (sckanCreated) {
63
- let isoTime = sckanCreated.replace(',', '.') // Date time does not accept commas but Sckan uses them
64
- sckanRelease = new Date(isoTime).toLocaleDateString('en-US', {
65
- day: '2-digit',
66
- month: 'long',
67
- year: 'numeric',
68
- })
69
- }
71
+ let isoTime = sckanCreated.replace(',', '.') // Date time does not accept commas but Sckan uses them
72
+ sckanRelease = new Date(isoTime).toLocaleDateString('en-US', {
73
+ day: '2-digit',
74
+ month: 'long',
75
+ year: 'numeric',
76
+ })
70
77
  }
71
78
  if (!sckanRelease) {
72
79
  sckanRelease = "Unknown";
73
80
  }
74
81
  }
75
- return sckanRelease
82
+ return sckanRelease
76
83
  },
77
84
  sckanReleaseLink: function() {
78
85
  let sckanLink = "Unknown"
@@ -95,6 +102,36 @@ export default {
95
102
  return flatmapSource
96
103
  },
97
104
  },
105
+ mounted: function () {
106
+ this.updateCopyContent();
107
+ },
108
+ methods: {
109
+ updateCopyContent: function () {
110
+ const contentArray = [];
111
+
112
+ // Use <div> instead of <h1>..<h6> or <p>
113
+ // to avoid default formatting on font size and margin
114
+
115
+ contentArray.push(`<div><strong>Flatmap Provenance</strong></div>`);
116
+
117
+ let versionContent = `<div>SCKAN version:</div>`;
118
+ versionContent += `\n`;
119
+ versionContent += `<div><a href="${this.sckanReleaseLink}">${this.sckanReleaseLink}</a></div>`;
120
+ contentArray.push(versionContent);
121
+
122
+ let publishedContent = `<div>Published on:</div>`;
123
+ publishedContent += `\n`;
124
+ publishedContent += `<div>${this.flatmapPublishedDisplay}</div>`;
125
+ contentArray.push(publishedContent);
126
+
127
+ let publicationContent = `<div>View publication:</div>`;
128
+ publicationContent += `\n`;
129
+ publicationContent += `<div><a href="${this.flatmapSource}">${this.flatmapSource}</a></div>`;
130
+ contentArray.push(publicationContent);
131
+
132
+ this.copyContent = contentArray.join('\n\n<br>');
133
+ },
134
+ }
98
135
  };
99
136
  </script>
100
137
 
@@ -145,4 +182,16 @@ export default {
145
182
  background-color: #979797;
146
183
  }
147
184
 
185
+ .float-button-container {
186
+ position: absolute;
187
+ bottom: 6px;
188
+ right: 12px;
189
+ opacity: 0;
190
+ visibility: hidden;
191
+
192
+ .flatmap-context-card:hover & {
193
+ opacity: 1;
194
+ visibility: visible;
195
+ }
196
+ }
148
197
  </style>
@@ -245,7 +245,6 @@ export default {
245
245
  const newView = {
246
246
  type: state.type,
247
247
  resource: state.resource,
248
- data: state.data,
249
248
  state: state.state,
250
249
  label: state.label
251
250
  };
@@ -299,15 +298,14 @@ export default {
299
298
  beforeMount: function() {
300
299
  if (this.options) {
301
300
  // Split options prop up to commit to the store
302
- this.options.sparcApi ? this.settingsStore.updateSparcAPI(this.options.sparcApi) : null;
303
- this.options.algoliaIndex ? this.settingsStore.updateAlgoliaIndex(this.options.algoliaIndex) : null;
304
- this.options.algoliaKey ? this.settingsStore.updateAlgoliaKey(this.options.algoliaKey) : null;
305
- this.options.algoliaId ? this.settingsStore.updateAlgoliaId(this.options.algoliaId) : null;
306
- this.options.pennsieveApi ? this.settingsStore.updatePennsieveApi(this.options.pennsieveApi) : null;
307
- this.options.flatmapAPI ? this.settingsStore.updateFlatmapAPI(this.options.flatmapAPI) : null;
308
- this.options.nlLinkPrefix ? this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix) : null;
309
- this.options.rootUrl ? this.settingsStore.updateRootUrl(this.options.rootUrl) : null;
310
- this.options.pmrHost ? this.settingsStore.updatePmrHost(this.options.pmrHost) : null;
301
+ this.options.sparcApi ? this.settingsStore.updateSparcAPI(this.options.sparcApi) : null
302
+ this.options.algoliaIndex ? this.settingsStore.updateAlgoliaIndex(this.options.algoliaIndex) : null
303
+ this.options.algoliaKey ? this.settingsStore.updateAlgoliaKey(this.options.algoliaKey) : null
304
+ this.options.algoliaId ? this.settingsStore.updateAlgoliaId(this.options.algoliaId) : null
305
+ this.options.pennsieveApi ? this.settingsStore.updatePennsieveApi(this.options.pennsieveApi) : null
306
+ this.options.flatmapAPI ? this.settingsStore.updateFlatmapAPI(this.options.flatmapAPI) : null,
307
+ this.options.nlLinkPrefix ? this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix) : null
308
+ this.options.rootUrl ? this.settingsStore.updateRootUrl(this.options.rootUrl) : null
311
309
  }
312
310
  this.splitFlowStore?.reset();
313
311
  this.splitFlowStore?.getAvailableTerms(this.settingsStore.sparcApi);
@@ -266,7 +266,7 @@ function getHumanData(term, label, dataset, scaffold, simulations) {
266
266
  data.actions = {
267
267
  search: {
268
268
  title: "Explore data",
269
- term: "Colon",
269
+ label: "Colon",
270
270
  resource: "https://sparc.science/data?type=dataset&q=colon",
271
271
  type: "Search",
272
272
  filter: {
@@ -289,7 +289,7 @@ function getHumanData(term, label, dataset, scaffold, simulations) {
289
289
  data.actions = {
290
290
  search: {
291
291
  title: "Explore data",
292
- term: "Heart",
292
+ label: "Heart",
293
293
  resource: "https://sparc.science/data?type=dataset&q=colon",
294
294
  type: "Search",
295
295
  filter: {
@@ -345,7 +345,7 @@ function getRatData(term, label, dataset, scaffold, simulations) {
345
345
  data.actions = {
346
346
  search: {
347
347
  title: "Explore data",
348
- term: "Heart",
348
+ label: "Heart",
349
349
  resource: "https://sparc.science/data?type=dataset&q=heart",
350
350
  type: "Search",
351
351
  filter: {
@@ -597,7 +597,7 @@ function getPigData(term, label, dataset, scaffold, simulations) {
597
597
  data.actions = {
598
598
  search: {
599
599
  title: "Explore data",
600
- term: "Heart",
600
+ label: "Heart",
601
601
  resource: "https://sparc.science/data?type=dataset&q=colon",
602
602
  type: "Search",
603
603
  filter: {
@@ -121,14 +121,8 @@ export default {
121
121
  actionClick: function (action) {
122
122
  if (action) {
123
123
  if (action.type == "Search") {
124
- if (action.filter) {
125
- this.openSearch([action.filter], action.term);
126
- Tagging.sendEvent({
127
- 'event': 'interaction_event',
128
- 'event_name': 'portal_maps_action_filter',
129
- 'category': action.term || 'filter',
130
- 'location': 'map_location_pin'
131
- });
124
+ if (action.nervePath) {
125
+ this.openSearch([action.filter], action.label);
132
126
  } else {
133
127
  this.openSearch([], action.term);
134
128
  // GA Tagging
@@ -565,7 +559,6 @@ export default {
565
559
  PENNSIEVE_API_LOCATION: this.settingsStore.pennsieveApi,
566
560
  NL_LINK_PREFIX: this.settingsStore.nlLinkPrefix,
567
561
  ROOT_URL: this.settingsStore.rootUrl,
568
- FLATMAP_API_LOCATION: this.settingsStore.flatmapAPI
569
562
  };
570
563
  },
571
564
  entries: function() {
@@ -5,7 +5,7 @@
5
5
  :entry="entry.resource"
6
6
  @resource-selected="flatmaprResourceSelected(entry.type, $event)"
7
7
  @pan-zoom-callback="flatmapPanZoomCallback"
8
- :name="entry.resource ? entry.resource : entry.data"
8
+ :name="entry.resource"
9
9
  style="height: 100%; width: 100%"
10
10
  :minZoom="entry.minZoom"
11
11
  :helpMode="helpMode"
@@ -77,6 +77,7 @@ export default {
77
77
  flatmaprResourceSelected: function (type, resource) {
78
78
  this.resourceSelected(
79
79
  type, resource, (this.$refs.flatmap.viewingMode === "Exploration"));
80
+
80
81
  if (resource.eventType === 'click' && resource.feature.type === 'feature') {
81
82
  const eventData = {
82
83
  label: resource.label || '',
@@ -332,7 +332,7 @@ export default {
332
332
  }
333
333
  },
334
334
  getFlatmapImp: function () {
335
- if (this.flatmapReady && this.$refs.multiflatmap) {
335
+ if (this.entry.type === "MultiFlatmap" && this.flatmapReady && this.$refs.multiflatmap) {
336
336
  return this.$refs.multiflatmap.getCurrentFlatmap()["mapImp"];
337
337
  } else {
338
338
  return undefined;
@@ -478,7 +478,7 @@ export default {
478
478
  z-index: 1;
479
479
  div {
480
480
  scale: 0.5;
481
- transform: translate(45px, -7px);
481
+ width: 0;
482
482
  }
483
483
  }
484
484
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <SimulationVuer
3
3
  :apiLocation="apiLocation"
4
- :id="id"
4
+ :id="entry.discoverId"
5
5
  />
6
6
  </template>
7
7
 
@@ -13,27 +13,9 @@ import "@abi-software/simulationvuer/dist/style.css";
13
13
 
14
14
  export default {
15
15
  name: "Simulation",
16
- data: function() {
17
- return {
18
- id: undefined,
19
- };
20
- },
21
16
  mixins: [ ContentMixin ],
22
17
  components: {
23
18
  SimulationVuer,
24
19
  },
25
- created: function() {
26
- if (this.entry) {
27
- if (this.entry.discoverId) {
28
- this.id = this.entry.discoverId;
29
- } else if (this.entry.resource) {
30
- if (this.settingsStore.pmrHost) {
31
- this.id = this.entry.resource.replace(this.settingsStore.pmrHost, '');
32
- } else {
33
- this.id = this.entry.resource;
34
- }
35
- }
36
- }
37
- }
38
20
  };
39
21
  </script>
@@ -99,41 +99,6 @@ export default {
99
99
  searchSuggestions: function () {
100
100
  return;
101
101
  },
102
- getMarkerClickedACtion: function(resource) {
103
- let label = this.idNamePair[resource.feature.models];
104
- let hardcodedAnnotation = markerZoomLevels.filter(
105
- mz => mz.id === resource.feature.models
106
- );
107
-
108
- if (this.settingsStore.isFeaturedMarkerIdentifier(resource.feature.id)) {
109
- // It is a featured dataset search for DOI.
110
- return {
111
- type: "Search",
112
- term: this.settingsStore.featuredMarkerDoi(
113
- resource.feature.id
114
- ),
115
- featuredDataset: true,
116
- };
117
- } else if (hardcodedAnnotation.filter(h => h.keyword).length > 0) {
118
- // if it matches our stored keywords, it is a keyword search
119
- // Keyword searches do not contain labels, so switch to keyword search if no label exists
120
- return {
121
- type: "Search",
122
- term:
123
- "http://purl.obolibrary.org/obo/" +
124
- resource.feature.models.replace(":", "_"),
125
- };
126
- } else {
127
- // Facet search on anatomy if it is not a keyword search
128
- return {
129
- type: "Facet",
130
- facet: label,
131
- facetPropPath: "anatomy.organ.category.name",
132
- term: "Anatomical structure",
133
- };
134
- }
135
-
136
- },
137
102
  /**
138
103
  * Callback when the vuers emit a selected event.
139
104
  */
@@ -143,6 +108,7 @@ export default {
143
108
  EventBus.emit("PopoverActionClick", resource);
144
109
  return;
145
110
  }
111
+
146
112
  let returnedAction = undefined;
147
113
  let action = "none";
148
114
  let fireResourceSelected = false;
@@ -153,33 +119,56 @@ export default {
153
119
  internalName: undefined,
154
120
  eventType: undefined,
155
121
  };
122
+
156
123
  if (type == "MultiFlatmap" || type == "Flatmap") {
157
- const flatmapImp = this.getFlatmapImp();
158
124
  result.internalName = this.idNamePair[resource.feature.models];
159
125
  if (resource.eventType == "click") {
160
126
  result.eventType = "selected";
161
127
  if (resource.feature.type == "marker") {
162
- returnedAction = this.getMarkerClickedACtion(resource);
128
+ let label = this.idNamePair[resource.feature.models];
129
+ let hardcodedAnnotation = markerZoomLevels.filter(
130
+ mz => mz.id === resource.feature.models
131
+ );
132
+
133
+ if (
134
+ this.settingsStore.isFeaturedMarkerIdentifier(
135
+ resource.feature.id
136
+ )
137
+ ) {
138
+ // It is a featured dataset search for DOI.
139
+ returnedAction = {
140
+ type: "Search",
141
+ term: this.settingsStore.featuredMarkerDoi(
142
+ resource.feature.id
143
+ ),
144
+ featuredDataset: true,
145
+ };
146
+ } else if (hardcodedAnnotation.filter(h => h.keyword).length > 0) {
147
+ // if it matches our stored keywords, it is a keyword search
148
+ // Keyword searches do not contain labels, so switch to keyword search if no label exists
149
+ returnedAction = {
150
+ type: "Search",
151
+ term:
152
+ "http://purl.obolibrary.org/obo/" +
153
+ resource.feature.models.replace(":", "_"),
154
+ };
155
+ } else {
156
+ // Facet search on anatomy if it is not a keyword search
157
+ returnedAction = {
158
+ type: "Facet",
159
+ facet: label,
160
+ facetPropPath: "anatomy.organ.category.name",
161
+ term: "Anatomical structure",
162
+ };
163
+ }
164
+
163
165
  fireResourceSelected = true;
164
166
  if (type == "MultiFlatmap") {
165
- flatmapImp.clearSearchResults();
167
+ const flatmap =
168
+ this.$refs.multiflatmap.getCurrentFlatmap().mapImp;
169
+ flatmap.clearSearchResults();
166
170
  }
167
171
  } else if (resource.feature.type == "feature") {
168
- if (flatmapImp.options && flatmapImp.options.style === 'functional') {
169
- if (resource.feature?.label) {
170
- const filter = {
171
- facet: "PMR",
172
- term: "Data type",
173
- facetPropPath: "item.types.name",
174
- };
175
- returnedAction = {
176
- filter: filter,
177
- type: "Search",
178
- term: resource.feature.label,
179
-
180
- };
181
- }
182
- }
183
172
  // Do no open scaffold in sync map
184
173
  if (this.syncMode) {
185
174
  fireResourceSelected = true;
@@ -11,7 +11,6 @@ export const useSettingsStore = defineStore('settings', {
11
11
  algoliaKey: undefined,
12
12
  algoliaId: undefined,
13
13
  pennsieveApi: undefined,
14
- pmrHost: "https://models.physiomeproject.org/",
15
14
  flatmapAPI: undefined,
16
15
  nlLinkPrefix: undefined,
17
16
  rootUrl: undefined,
@@ -69,9 +68,6 @@ export const useSettingsStore = defineStore('settings', {
69
68
  updateRootUrl(rootUrl) {
70
69
  this.rootUrl = rootUrl;
71
70
  },
72
- updatePmrHost(pmrHost) {
73
- this.pmrHost = pmrHost ? pmrHost : "https://models.physiomeproject.org/";
74
- },
75
71
  updateMarkers(markers) {
76
72
  this.markers = markers;
77
73
  },