@abi-software/map-side-bar 2.0.1 → 2.2.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/map-side-bar",
3
- "version": "2.0.1",
3
+ "version": "2.2.0",
4
4
  "files": [
5
5
  "dist/*",
6
6
  "src/*",
@@ -37,7 +37,7 @@
37
37
  "./src/*": "./src/*"
38
38
  },
39
39
  "dependencies": {
40
- "@abi-software/gallery": "^1.0.0",
40
+ "@abi-software/gallery": "^1.1.0",
41
41
  "@abi-software/svg-sprite": "^1.0.0",
42
42
  "@element-plus/icons-vue": "^2.3.1",
43
43
  "algoliasearch": "^4.10.5",
package/src/App.vue CHANGED
@@ -22,6 +22,7 @@
22
22
  :activeId="activeId"
23
23
  @tabClicked="tabClicked"
24
24
  @search-changed="searchChanged($event)"
25
+ @hover-changed="hoverChanged($event)"
25
26
  @actionClick="action"
26
27
  />
27
28
  </div>
@@ -110,6 +111,9 @@ export default {
110
111
  }
111
112
  },
112
113
  methods: {
114
+ hoverChanged: function (data) {
115
+ console.log('hoverChanged', data)
116
+ },
113
117
  searchChanged: function (data) {
114
118
  console.log(data)
115
119
  },
@@ -205,7 +209,10 @@ export default {
205
209
  console.log('mounted app')
206
210
  EventBus.on('contextUpdate', (payLoad) => {
207
211
  console.log('contextUpdate', payLoad)
208
- })
212
+ });
213
+ EventBus.on('datalink-clicked', (payLoad) => {
214
+ console.log('datalink-clicked', payLoad)
215
+ });
209
216
  },
210
217
  }
211
218
  </script>
@@ -100,6 +100,7 @@ export class AlgoliaClient {
100
100
  for (let res of results) {
101
101
  newResult = { ...res }
102
102
  newResult = {
103
+ anatomy: res.anatomy ? res.anatomy.organ.map((organ => organ.curie)) : undefined,
103
104
  doi: res.item.curie.split(':')[1],
104
105
  name: res.item.name,
105
106
  description: res.item.description,
@@ -167,6 +168,7 @@ export class AlgoliaClient {
167
168
  'item.name',
168
169
  'item.description',
169
170
  'objectID',
171
+ 'anatomy.organ.curie'
170
172
  ],
171
173
  })
172
174
  .then(response => {
@@ -15,6 +15,7 @@
15
15
  :dataset-biolucida="biolucidaData"
16
16
  :category="currentCategory"
17
17
  @card-clicked="galleryClicked"
18
+ @datalink-clicked="galleryDatalinkClicked"
18
19
  />
19
20
  </span>
20
21
  <div class="card-right">
@@ -163,6 +164,9 @@ export default {
163
164
  galleryClicked: function (payload) {
164
165
  this.propogateCardAction(payload)
165
166
  },
167
+ galleryDatalinkClicked: function (payload) {
168
+ EventBus.emit('datalink-clicked', payload); // Pass to mapintegratedvuer
169
+ },
166
170
  openDataset: function () {
167
171
  window.open(this.dataLocation, '_blank')
168
172
  },
@@ -13,6 +13,7 @@
13
13
  :body-style="bodyStyle"
14
14
  :shadow="shadow"
15
15
  @card-clicked="cardClicked"
16
+ @datalink-clicked="datalinkClicked"
16
17
  ref="gallery"
17
18
  />
18
19
  </div>
@@ -116,6 +117,9 @@ export default {
116
117
  cardClicked: function (payload) {
117
118
  this.$emit('card-clicked', payload)
118
119
  },
120
+ datalinkClicked: function (payload) {
121
+ this.$emit('datalink-clicked', payload);
122
+ },
119
123
  createSciCurnchItems: function () {
120
124
  this.updateS3Bucket(this.entry.s3uri)
121
125
  this.createDatasetItem()
@@ -171,7 +175,7 @@ export default {
171
175
  let thumbnailURL = undefined
172
176
  let mimetype = ''
173
177
  if (thumbnail) {
174
-
178
+
175
179
  thumbnailURL = this.getImageURL(this.envVars.API_LOCATION, {
176
180
  id,
177
181
  prefix: this.getS3Prefix(),
@@ -35,6 +35,7 @@
35
35
  :envVars="envVars"
36
36
  :ref="tab.id"
37
37
  @search-changed="searchChanged(tab.id, $event)"
38
+ @hover-changed="hoverChanged($event)"
38
39
  />
39
40
  </template>
40
41
  </div>
@@ -113,11 +114,18 @@ export default {
113
114
  }
114
115
  },
115
116
  methods: {
117
+ /**
118
+ * This event is emitted when the mouse hover are changed.
119
+ * @arg data
120
+ */
121
+ hoverChanged: function (data) {
122
+ this.$emit('hover-changed', data)
123
+ },
124
+ /**
125
+ * This event is emitted when the search filters are changed.
126
+ * @arg `obj` {data, id}
127
+ */
116
128
  searchChanged: function (id, data) {
117
- /**
118
- * This event is emitted when the search filters are changed.
119
- * @arg `obj` {data, id}
120
- */
121
129
  this.$emit('search-changed', { ...data, id: id })
122
130
  },
123
131
  /**
@@ -211,6 +219,15 @@ export default {
211
219
  */
212
220
  this.$emit('contextUpdate', payLoad)
213
221
  })
222
+ EventBus.on('datalink-clicked', (payLoad) => {
223
+ /**
224
+ * This event is emitted
225
+ * when the dataset button or dataset image thumbnail
226
+ * from the gallery component is clicked.
227
+ * @arg payload
228
+ */
229
+ this.$emit('datalink-clicked', payLoad);
230
+ })
214
231
  },
215
232
  }
216
233
  </script>
@@ -39,7 +39,13 @@
39
39
  No results found - Please change your search / filter criteria.
40
40
  </div>
41
41
  <div v-for="result in results" :key="result.doi" class="step-item">
42
- <DatasetCard :entry="result" :envVars="envVars"></DatasetCard>
42
+ <DatasetCard
43
+ class="dataset-card"
44
+ :entry="result"
45
+ :envVars="envVars"
46
+ @mouseenter="hoverChanged(result)"
47
+ @mouseleave="hoverChanged(undefined)"
48
+ />
43
49
  </div>
44
50
  <el-pagination
45
51
  class="pagination"
@@ -154,6 +160,9 @@ export default {
154
160
  },
155
161
  },
156
162
  methods: {
163
+ hoverChanged: function (data) {
164
+ this.$emit('hover-changed', data)
165
+ },
157
166
  resetSearch: function () {
158
167
  this.numberOfHits = 0
159
168
  this.discoverIds = []
@@ -449,6 +458,12 @@ export default {
449
458
  </script>
450
459
 
451
460
  <style lang="scss" scoped>
461
+ .dataset-card:hover {
462
+ border-style: solid;
463
+ border-color: var(--el-color-primary);
464
+ border-radius: 5px;
465
+ }
466
+
452
467
  .content-card {
453
468
  height: 100%;
454
469
  flex-flow: column;
@@ -527,7 +542,7 @@ export default {
527
542
  }
528
543
 
529
544
  .content :deep(.step-item:not(:first-child) .seperator-path) {
530
- width: 486px;
545
+ width: 455px;
531
546
  height: 0px;
532
547
  border: solid 1px #e4e7ed;
533
548
  background-color: #e4e7ed;