@abi-software/map-side-bar 2.0.1 → 2.1.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.1.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
@@ -205,7 +205,10 @@ export default {
205
205
  console.log('mounted app')
206
206
  EventBus.on('contextUpdate', (payLoad) => {
207
207
  console.log('contextUpdate', payLoad)
208
- })
208
+ });
209
+ EventBus.on('datalink-clicked', (payLoad) => {
210
+ console.log('datalink-clicked', payLoad)
211
+ });
209
212
  },
210
213
  }
211
214
  </script>
@@ -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(),
@@ -211,6 +211,15 @@ export default {
211
211
  */
212
212
  this.$emit('contextUpdate', payLoad)
213
213
  })
214
+ EventBus.on('datalink-clicked', (payLoad) => {
215
+ /**
216
+ * This event is emitted
217
+ * when the dataset button or dataset image thumbnail
218
+ * from the gallery component is clicked.
219
+ * @arg payload
220
+ */
221
+ this.$emit('datalink-clicked', payLoad);
222
+ })
214
223
  },
215
224
  }
216
225
  </script>