@abi-software/map-side-bar 2.4.0-isan-0 → 2.4.0-isan-1

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.4.0-isan-0",
3
+ "version": "2.4.0-isan-1",
4
4
  "files": [
5
5
  "dist/*",
6
6
  "src/*",
@@ -110,6 +110,10 @@ import {
110
110
  "flatmap"
111
111
  type: String
112
112
  descriptin: (Optional) to link to flatmap
113
+
114
+ "simulation"
115
+ type: String
116
+ descriptin: (Optional) simulation resource
113
117
  * ---------------------------------------
114
118
  */
115
119
 
@@ -143,16 +147,26 @@ export default {
143
147
  };
144
148
  },
145
149
  methods: {
146
- onFlatmapClick: function (payload) {
147
- this.$emit('flatmap-clicked', payload)
150
+ onFlatmapClick: function (data) {
151
+ this.emitPMRActionClick({
152
+ type: 'Flatmap',
153
+ resource: data
154
+ });
155
+ },
156
+ onSimulationClick: function (data) {
157
+ this.emitPMRActionClick({
158
+ type: 'Simulation',
159
+ resource: data,
160
+ });
148
161
  },
149
- onSimulationClick: function (payload) {
150
- const simulationData = {
151
- title: this.entry.title,
162
+ emitPMRActionClick: function (data) {
163
+ const payload = {
164
+ ...data,
165
+ name: this.entry.title,
152
166
  description: this.entry.description,
153
- resource: payload,
167
+ apiLocation: this.envVars.API_LOCATION,
154
168
  };
155
- this.$emit('simulation-clicked', simulationData)
169
+ this.$emit('pmr-action-click', payload);
156
170
  },
157
171
  }
158
172
  };
@@ -46,8 +46,7 @@
46
46
  :contextCardEntry="tab.contextCard"
47
47
  :envVars="envVars"
48
48
  :ref="'searchTab_' + tab.id"
49
- @flatmap-clicked="onFlatmapClicked"
50
- @simulation-clicked="onSimulationClicked"
49
+ @pmr-action-click="onPmrActionClick"
51
50
  @search-changed="searchChanged(tab.id, $event)"
52
51
  @hover-changed="hoverChanged($event)"
53
52
  />
@@ -248,22 +247,7 @@ export default {
248
247
  setDrawerOpen: function (value = true) {
249
248
  this.drawerOpen = value
250
249
  },
251
- onFlatmapClicked: function (data) {
252
- const payload = {
253
- type: 'Flatmap',
254
- data: data
255
- };
256
- this.$emit('actionClick', payload);
257
- },
258
- onSimulationClicked: function (data) {
259
- const payload = {
260
- type: 'Simulation',
261
- title: 'View simulation',
262
- apiLocation: this.envVars.API_LOCATION,
263
- name: data.title,
264
- description: data.description,
265
- resource: data.resource,
266
- };
250
+ onPmrActionClick: function (payload) {
267
251
  this.$emit('actionClick', payload);
268
252
  },
269
253
  /**
@@ -53,8 +53,7 @@
53
53
  class="dataset-card"
54
54
  :entry="result"
55
55
  :envVars="envVars"
56
- @flatmap-clicked="onFlatmapClicked"
57
- @simulation-clicked="onSimulationClicked"
56
+ @pmr-action-click="onPmrActionClick"
58
57
  @mouseenter="hoverChanged(result)"
59
58
  @mouseleave="hoverChanged(undefined)"
60
59
  ></PMRDatasetCard>
@@ -199,11 +198,8 @@ export default {
199
198
  hoverChanged: function (data) {
200
199
  this.$emit('hover-changed', data)
201
200
  },
202
- onFlatmapClicked: function (data) {
203
- this.$emit('flatmap-clicked', data);
204
- },
205
- onSimulationClicked: function (payload) {
206
- this.$emit('simulation-clicked', payload)
201
+ onPmrActionClick: function (data) {
202
+ this.$emit('pmr-action-click', data);
207
203
  },
208
204
  // resetSearch: Resets the results, and page, and variable results ratio
209
205
  // Does not: reset filters, search input, or search history