@abi-software/flatmapvuer 0.6.0-vue3.6 → 0.6.0-vue3.8

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/flatmapvuer",
3
- "version": "0.6.0-vue3.6",
3
+ "version": "0.6.0-vue3.8",
4
4
  "license": "Apache-2.0",
5
5
  "files": [
6
6
  "dist/*",
package/src/App.vue CHANGED
@@ -9,29 +9,48 @@
9
9
  >
10
10
  <div class="options-container">
11
11
  <el-row :gutter="20">
12
- <el-button @click="helpMode = !helpMode" size="small"
13
- >Help Mode</el-button
14
- >
15
- <el-button @click="saveSettings()" size="small"
16
- >Save Settings</el-button
17
- >
18
- <el-button
19
- :disabled="mapSettings.length === 0"
20
- @click="restoreSettings()"
21
- size="small"
22
- >Restore Settings</el-button
23
- >
24
- <el-autocomplete
25
- class="search-box"
26
- placeholder="Search"
27
- v-model="searchText"
28
- :fetch-suggestions="fetchSuggestions"
29
- @keyup.enter="search"
30
- @select="search"
31
- popper-class="autocomplete-popper"
32
- :teleported="false"
33
- >
34
- </el-autocomplete>
12
+ <el-col :span="8">
13
+ <el-button @click="helpMode = !helpMode" size="small"
14
+ >Help Mode</el-button
15
+ >
16
+ </el-col>
17
+ <el-col :span="8">
18
+ <el-button @click="saveSettings()" size="small"
19
+ >Save Settings</el-button
20
+ >
21
+ </el-col>
22
+ <el-col :span="8">
23
+ <el-button
24
+ :disabled="mapSettings.length === 0"
25
+ @click="restoreSettings()"
26
+ size="small"
27
+ >Restore Settings</el-button
28
+ >
29
+ </el-col>
30
+ </el-row>
31
+ <el-row>
32
+ <el-col>
33
+ <el-switch
34
+ v-model="disableUI"
35
+ active-text="Disable UI"
36
+ >
37
+ </el-switch>
38
+ </el-col>
39
+ </el-row>
40
+ <el-row>
41
+ <el-col>
42
+ <el-autocomplete
43
+ class="search-box"
44
+ placeholder="Search"
45
+ v-model="searchText"
46
+ :fetch-suggestions="fetchSuggestions"
47
+ @keyup.enter="search"
48
+ @select="search"
49
+ popper-class="autocomplete-popper"
50
+ :teleported="false"
51
+ >
52
+ </el-autocomplete>
53
+ </el-col>
35
54
  </el-row>
36
55
  </div>
37
56
  <template #reference>
@@ -57,6 +76,7 @@
57
76
  :displayMinimap="true"
58
77
  :enableOpenMapUI="true"
59
78
  :flatmapAPI="flatmapAPI"
79
+ :disableUI="disableUI"
60
80
  />
61
81
  </div>
62
82
  </template>
@@ -150,6 +170,7 @@ export default {
150
170
  searchable: true,
151
171
  pathControls: true,
152
172
  layerControl: true,
173
+ disableUI: false,
153
174
  minZoom: 4,
154
175
  availableSpecies: {
155
176
  'Human Female': {
@@ -11,7 +11,7 @@
11
11
  style="height: 100%; width: 100%; position: relative; overflow-y: none"
12
12
  >
13
13
  <div style="height: 100%; width: 100%" ref="display"></div>
14
- <div class="beta-popovers">
14
+ <div class="beta-popovers" v-show="!disableUI">
15
15
  <div>
16
16
  <el-popover
17
17
  placement="right"
@@ -136,7 +136,7 @@
136
136
  <el-icon-arrow-down />
137
137
  </el-icon>
138
138
 
139
- <div class="bottom-right-control">
139
+ <div class="bottom-right-control" v-show="!disableUI">
140
140
  <el-popover
141
141
  content="Zoom in"
142
142
  placement="left"
@@ -213,6 +213,7 @@
213
213
  <div
214
214
  class="pathway-location"
215
215
  :class="{ open: drawerOpen, close: !drawerOpen }"
216
+ v-show="!disableUI"
216
217
  >
217
218
  <div
218
219
  class="pathway-container"
@@ -279,7 +280,7 @@
279
280
  ref="centrelinesSelection"
280
281
  key="centrelinesSelection"
281
282
  />
282
- <!--
283
+ <!--
283
284
  <selections-group
284
285
  v-if="isFC && sckanDisplay && sckanDisplay.length > 0"
285
286
  title="SCKAN"
@@ -429,6 +430,7 @@
429
430
  <div
430
431
  class="settings-group"
431
432
  :class="{ open: drawerOpen, close: !drawerOpen }"
433
+ v-show="!disableUI"
432
434
  >
433
435
  <el-row>
434
436
  <el-popover
@@ -975,6 +977,11 @@ export default {
975
977
  },
976
978
  displayTooltip: function (feature) {
977
979
  this.tooltipDisplay = true
980
+ if (!this.disableUI) {
981
+ this.displayPopup(feature)
982
+ }
983
+ },
984
+ displayPopup: function (feature) {
978
985
  this.mapImp.showPopup(
979
986
  this.mapImp.modelFeatureIds(feature)[0],
980
987
  this.$refs.tooltip.$el,
@@ -1337,6 +1344,13 @@ export default {
1337
1344
  type: String,
1338
1345
  default: 'https://api.sparc.science/',
1339
1346
  },
1347
+ /**
1348
+ * Flag to disable UIs on Map
1349
+ */
1350
+ disableUI: {
1351
+ type: Boolean,
1352
+ default: false,
1353
+ }
1340
1354
  },
1341
1355
  provide() {
1342
1356
  return {
@@ -1424,6 +1438,11 @@ export default {
1424
1438
  immediate: true,
1425
1439
  deep: true,
1426
1440
  },
1441
+ disableUI: function (isUIDisabled) {
1442
+ if (isUIDisabled) {
1443
+ this.closeTooltip()
1444
+ }
1445
+ }
1427
1446
  },
1428
1447
  mounted: function () {
1429
1448
  this.openMapRef = shallowRef(this.$refs.openMapRef)
@@ -2087,21 +2106,6 @@ export default {
2087
2106
  font-weight: 500;
2088
2107
  color: rgb(48, 49, 51);
2089
2108
  width: 150px!important;
2090
- :deep(.el-input__inner) {
2091
- height: 30px;
2092
- color: rgb(48, 49, 51);
2093
- }
2094
- :deep() {
2095
- .el-input__inner {
2096
- &is-focus,
2097
- &:focus {
2098
- border: 1px solid $app-primary-color;
2099
- }
2100
- }
2101
- }
2102
- :deep(.el-input__icon) {
2103
- line-height: 30px;
2104
- }
2105
2109
  }
2106
2110
 
2107
2111
  :deep(.flatmap_dropdown) {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="multi-container" ref="multiContainer">
3
- <div style="position: absolute; z-index: 10">
3
+ <div style="position: absolute; z-index: 10" v-if="!disableUI">
4
4
  <div class="species-display-text">Species</div>
5
5
  <el-popover
6
6
  content="Select a species"
@@ -51,6 +51,7 @@
51
51
  :ref="key"
52
52
  :enableOpenMapUI="enableOpenMapUI"
53
53
  :openMapOptions="openMapOptions"
54
+ :disableUI="disableUI"
54
55
  @view-latest-map="viewLatestMap"
55
56
  @resource-selected="FlatmapSelected"
56
57
  @ready="FlatmapReady"
@@ -77,6 +78,7 @@
77
78
  import { reactive } from 'vue'
78
79
  import EventBus from './EventBus'
79
80
  import FlatmapVuer from './FlatmapVuer.vue'
81
+ import * as flatmap from '@abi-software/flatmap-viewer'
80
82
  import {
81
83
  ElCol as Col,
82
84
  ElOption as Option,
@@ -307,10 +309,7 @@ export default {
307
309
  //uuid is in the state but should be checked if it is the latest map
308
310
  //for that taxon
309
311
  return new Promise(() => {
310
- const mapManager =
311
- new (require('@abi-software/flatmap-viewer').MapManager)(
312
- this.flatmapAPI
313
- )
312
+ const mapManager = new flatmap.MapManager(this.flatmapAPI)
314
313
  //mapManager.findMap_ is an async function so we need to wrap this with a promise
315
314
  const identifier = { taxon: mapState.entry }
316
315
  if (mapState.biologicalSex)
@@ -499,6 +498,13 @@ export default {
499
498
  type: String,
500
499
  default: 'https://api.sparc.science/',
501
500
  },
501
+ /**
502
+ * Flag to disable UIs on Map
503
+ */
504
+ disableUI: {
505
+ type: Boolean,
506
+ default: false,
507
+ }
502
508
  },
503
509
  data: function () {
504
510
  return {
@@ -79,7 +79,7 @@ export default {
79
79
  defaultExpandedKeys: ['All'],
80
80
  }
81
81
  },
82
- destroyed: function () {
82
+ unmounted: function () {
83
83
  this.sortedPrimitiveGroups = undefined
84
84
  },
85
85
  methods: {
@@ -118,9 +118,6 @@ export default {
118
118
  </script>
119
119
 
120
120
  <style lang="scss" scoped>
121
- @use 'element-plus/theme-chalk/src/checkbox';
122
- @use 'element-plus/theme-chalk/src/row';
123
- @use 'element-plus/theme-chalk/src/tree';
124
121
 
125
122
  .checkbox-container {
126
123
  display: flex;
@@ -1,4 +1,4 @@
1
- export default '<svg width="160px" height="24px" viewBox="0 0 160 24" fill="yellow">' +
1
+ export default '<svg width="195px" height="24px" viewBox="0 0 160 24" fill="yellow">' +
2
2
  '<path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/>' +
3
3
  // Adjusting the x attribute and adding padding for the text element
4
4
  '<text x="42" y="50%" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#000000">Featured dataset marker</text>' +