@abi-software/mapintegratedvuer 0.7.0-vue3.7 → 0.7.0-vue3.9

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": "0.7.0-vue3.7",
3
+ "version": "0.7.0-vue3.9",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "serve": "vite --host --force",
@@ -42,11 +42,11 @@
42
42
  "*.js"
43
43
  ],
44
44
  "dependencies": {
45
- "@abi-software/flatmapvuer": "^0.6.0-vue3.7",
45
+ "@abi-software/flatmapvuer": "^0.6.1-vue3.8",
46
46
  "@abi-software/map-side-bar": "^1.7.0-vue3.4",
47
- "@abi-software/plotvuer": "^0.4.0-vue-3-alpha.7",
47
+ "@abi-software/plotvuer": "^0.4.0-vue-3-alpha.10",
48
48
  "@abi-software/scaffoldvuer": "^0.4.0-vue3.6",
49
- "@abi-software/simulationvuer": "^0.7.0-vue-3-alpha.4",
49
+ "@abi-software/simulationvuer": "^0.7.0-vue-3-alpha.5",
50
50
  "@abi-software/svg-sprite": "^0.4.0-vue3-beta.0",
51
51
  "@cypress/vite-dev-server": "^5.0.7",
52
52
  "@element-plus/icons-vue": "^2.3.1",
@@ -126,6 +126,9 @@
126
126
  }
127
127
  ]
128
128
  },
129
+ "overrides": {
130
+ "@abi-software/flatmapvuer": "$@abi-software/flatmapvuer"
131
+ },
129
132
  "browserslist": [
130
133
  "> 1%",
131
134
  "last 2 versions"
@@ -21,7 +21,7 @@
21
21
  {{ getEntryTitle(entry) }}
22
22
  </div>
23
23
  </div>
24
- <el-row class="icon-group">
24
+ <el-row class="icon-group">
25
25
  <div v-show="contextCardEntry && contextCardVisible" class="hide" @click="contextCardVisible = false">
26
26
  Hide information
27
27
  <el-icon><el-icon-arrow-up /></el-icon>
@@ -30,7 +30,7 @@
30
30
  Show information
31
31
  <el-icon><el-icon-arrow-down /></el-icon>
32
32
  </div>
33
-
33
+
34
34
  <el-popover
35
35
  placement="bottom"
36
36
  :teleported="false"
@@ -42,13 +42,13 @@
42
42
  :visible="contextCardVisible"
43
43
  >
44
44
  <template #default v-if="contextCardEntry">
45
- <flatmap-context-card
45
+ <flatmap-context-card
46
46
  class="flatmap-context-card"
47
- v-if="(contextCardEntry.type == 'Flatmap' ||
48
- contextCardEntry.type == 'MultiFlatmap')"
47
+ v-if="(contextCardEntry.type == 'Flatmap' ||
48
+ contextCardEntry.type == 'MultiFlatmap')"
49
49
  :mapImpProv="contextCardEntry.mapImpProv"
50
50
  />
51
- <context-card
51
+ <context-card
52
52
  v-if="contextCardEntry.type.toLowerCase() == 'scaffold'"
53
53
  :entry="contextCardEntry"
54
54
  :envVars="envVars"
@@ -152,8 +152,8 @@ export default {
152
152
  ROOT_URL: this.settingsStore.rootUrl,
153
153
  };
154
154
  },
155
- popperOptions: function() {
156
- return {
155
+ popperOptions: function() {
156
+ return {
157
157
  preventOverflow: {
158
158
  enabled: true,
159
159
  boundary: this.boundariesElement,
@@ -245,7 +245,7 @@ export default {
245
245
  font-size: 14px;
246
246
  font-weight: normal;
247
247
  line-height: 20px;
248
- margin-left: 11px;
248
+ margin-left: 1rem;
249
249
  margin-top: 4px;
250
250
  }
251
251
 
@@ -278,7 +278,7 @@ export default {
278
278
  color: $app-primary-color;
279
279
  }
280
280
  }
281
-
281
+
282
282
  :deep(.el-input__icon) {
283
283
  line-height: 24px;
284
284
  color: $lightGrey;
@@ -322,21 +322,24 @@ export default {
322
322
  color: $app-primary-color;
323
323
  cursor: pointer;
324
324
  margin-right: 6px;
325
- margin-top: 3px;
325
+ margin-top: 8px;
326
326
  }
327
327
 
328
328
  .icon-group {
329
+ position: relative;
330
+ top: auto;
329
331
  font-size: 12px;
330
332
  }
331
333
 
332
334
  .info-icon {
335
+ margin-top: 2px;
333
336
  margin-right: 8px;
334
337
  font-size: 28px;
335
338
  color: $app-primary-color;
336
339
  cursor: pointer;
337
340
  &::before { // since the icon is a font, we need to adjust the vertical alignment
338
341
  position: relative;
339
- top: -2px;
342
+ top: -2px;
340
343
  }
341
344
  }
342
345
 
@@ -87,7 +87,7 @@ export default {
87
87
  },
88
88
  getState: function () {
89
89
  return this.$refs.viewer.getState();
90
- },
90
+ },
91
91
  resourceSelected: function (payload) {
92
92
  this.$emit("resource-selected", payload);
93
93
  },
@@ -169,6 +169,10 @@ export default {
169
169
  height: 32px;
170
170
  border-bottom: 1px solid rgb(220, 223, 230);
171
171
  z-index: 7;
172
+ box-sizing: border-box;
173
+ display: flex;
174
+ flex-direction: row;
175
+ justify-content: space-between;
172
176
  }
173
177
 
174
178
  .component-container {
@@ -177,6 +181,7 @@ export default {
177
181
  bottom: 0px;
178
182
  position: absolute;
179
183
  z-index:6;
184
+ overflow: hidden;
180
185
  }
181
186
 
182
187
  .dataset-header {
@@ -19,16 +19,18 @@ export default {
19
19
  }
20
20
  },
21
21
  deactivate: function() {
22
- this._sensor.detach(this.$refs.display, this.displayResize);
23
- delete this._sensor;
24
- this._sensor = undefined;
25
- this.displayResize();
22
+ if (this._sensor) {
23
+ this._sensor.detach(this.$refs.display, this.displayResize);
24
+ delete this._sensor;
25
+ this._sensor = undefined;
26
+ this.displayResize();
27
+ }
26
28
  },
27
29
  displayResize: function() {
28
30
  this.$emit("resize");
29
31
  },
30
32
  },
31
- beforeDestroy() {
33
+ unmounted() {
32
34
  this.deactivate();
33
35
  },
34
36
  activated() {
@@ -22,7 +22,7 @@
22
22
  <script>
23
23
  /* eslint-disable no-alert, no-console */
24
24
  import { MapSvgIcon } from '@abi-software/svg-sprite';
25
- import {
25
+ import {
26
26
  ElAutocomplete as Autocomplete
27
27
  } from "element-plus";
28
28
 
@@ -80,16 +80,14 @@ export default {
80
80
  font-size: 0.8rem;
81
81
  margin-left: 0.5rem;
82
82
  }
83
- .search-box {
83
+ :deep(.search-box) {
84
84
  margin-top: 2px;
85
85
  margin-left:0.5rem;
86
86
  height:28px;
87
87
  width:137px;
88
- :deep(.el-input__inner) {
89
- background-color: $background;
90
- height:28px;
88
+ .el-input__inner {
89
+ height:26px;
91
90
  line-height:28px;
92
- border: 1px solid rgb(144, 147, 153);
93
91
  border-radius: 4px;
94
92
  &:focus {
95
93
  border-color: $app-primary-color;
@@ -305,13 +305,17 @@ export default {
305
305
  }
306
306
 
307
307
  if (flatmapImp) {
308
+ // create the star marker
308
309
  let wrapperElement = document.createElement("div");
309
310
  wrapperElement.innerHTML = YellowStar;
310
311
 
312
+ // add it to the flatmap
311
313
  const markerIdentifier = flatmapImp.addMarker(marker, {
312
314
  element: wrapperElement,
313
315
  className: "highlight-marker"
314
316
  });
317
+
318
+ // update the store with the marker identifier
315
319
  this.settingsStore.updateFeaturedMarkerIdentifier({
316
320
  index,
317
321
  markerIdentifier,
@@ -362,9 +366,12 @@ export default {
362
366
 
363
367
  :deep(.maplibregl-marker) {
364
368
  &.standard-marker {
369
+ cursor: pointer !important;
365
370
  z-index: 2;
366
371
  }
367
372
  &.highlight-marker {
373
+ visibility: visible !important;
374
+ cursor: pointer !important;
368
375
  z-index: 1;
369
376
  div {
370
377
  scale: 0.5;
@@ -278,6 +278,7 @@ export default {
278
278
  } catch (error) {
279
279
  markerSpecies = undefined;
280
280
  }
281
+ this.updateFeatureMarkers([markerCurie], undefined)
281
282
  this.settingsStore.updateFeaturedMarker({
282
283
  identifier,
283
284
  marker: markerCurie,
@@ -286,19 +287,45 @@ export default {
286
287
  });
287
288
  });
288
289
  },
290
+ // Check if the old featured dataset api has any info
291
+ oldFeaturedDatasetApiHasInfo: async function () {
292
+ let response = await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)
293
+ let data = await response.json()
294
+ if (!data.identifiers || data.identifiers.length == 0) {
295
+ return false;
296
+ } else {
297
+ return data.identifiers;
298
+ }
299
+ },
300
+ // Check if the new featured dataset api has any info
301
+ newFeaturedDatasetApiHasInfo: async function () {
302
+ let response = await fetch(`${this.apiLocation}get_featured_dataset`)
303
+ let data = await response.json()
304
+ if (!data.datasets || data.datasets.length == 0) {
305
+ return false;
306
+ } else {
307
+ return data.datasets.map(d => d.id);
308
+ }
309
+ },
310
+
289
311
  /**
290
312
  * Get a list of featured datasets to display.
291
313
  */
292
- getFeaturedDatasets: function () {
293
- const local_this = this;
294
- fetch(`${this.apiLocation}get_featured_datasets_identifiers`)
295
- .then(response => response.json())
296
- .then(data => {
297
- this.settingsStore.updateFeatured(data.identifiers);
298
- data.identifiers.forEach(element => {
299
- local_this.getDatasetAnatomyInfo(element);
300
- });
301
- });
314
+ getFeaturedDatasets: async function () {
315
+ let datasetIds = [];
316
+
317
+ // Check the two api endpoints for featured datasets, old one first
318
+ let oldInfo = await this.oldFeaturedDatasetApiHasInfo();
319
+ if (oldInfo) datasetIds = oldInfo;
320
+ else {
321
+ let newInfo = await this.newFeaturedDatasetApiHasInfo();
322
+ if (newInfo) datasetIds = newInfo;
323
+ }
324
+ // Update the store with the new list of featured datasets
325
+ this.settingsStore.updateFeatured(datasetIds);
326
+ datasetIds.forEach(element => {
327
+ this.getDatasetAnatomyInfo(element)
328
+ });
302
329
  },
303
330
  zoomToFeatures: function () {
304
331
  return;
package/vite.config.js CHANGED
@@ -11,7 +11,7 @@ export default defineConfig(({ command, mode }) => {
11
11
  css: {
12
12
  preprocessorOptions: {
13
13
  scss: {
14
- additionalData: `@use '${pathSrc}/assets/styles' as *;`
14
+ additionalData: `@use './src/assets/styles' as *;`
15
15
  },
16
16
  },
17
17
  },