@abi-software/scaffoldvuer 1.4.1-image.0 → 1.4.2

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/scaffoldvuer",
3
- "version": "1.4.1-image.0",
3
+ "version": "1.4.2",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,18 +41,17 @@
41
41
  "*.js"
42
42
  ],
43
43
  "dependencies": {
44
- "@abi-software/map-utilities": "^1.1.0-beta.2",
44
+ "@abi-software/map-utilities": "^1.1.2",
45
45
  "@abi-software/sparc-annotation": "^0.3.1",
46
- "@abi-software/svg-sprite": "^1.0.0",
46
+ "@abi-software/svg-sprite": "^1.0.1",
47
47
  "@element-plus/icons-vue": "^2.3.1",
48
- "@vue/compat": "^3.4.15",
49
48
  "core-js": "^3.22.5",
50
- "element-plus": "^2.4.4",
49
+ "element-plus": "2.8.4",
51
50
  "minisearch": "^6.0.1",
52
51
  "pinia": "^2.1.7",
53
52
  "simple-dropzone": "^0.8.3",
54
53
  "unplugin-vue-components": "^0.26.0",
55
- "vue": "^3.4.15",
54
+ "vue": "^3.4.21",
56
55
  "vue-router": "^4.2.5",
57
56
  "vue3-component-svg-sprite": "^0.0.1",
58
57
  "zincjs": "^1.11.4"
@@ -60,11 +59,9 @@
60
59
  "devDependencies": {
61
60
  "@vitejs/plugin-vue": "^4.6.2",
62
61
  "@vuese/markdown-render": "^2.11.3",
63
- "@vuese/parser": "^2.9.1",
64
62
  "auto-changelog": "^2.4.0",
65
63
  "babel-eslint": "^10.1.0",
66
64
  "babel-plugin-component": "^1.1.1",
67
- "base64-inline-loader": "^2.0.1",
68
65
  "chokidar": "^3.6.0",
69
66
  "concurrently": "^8.2.2",
70
67
  "eslint": "^8.56.0",
@@ -73,7 +70,7 @@
73
70
  "vite": "^5.0.10",
74
71
  "vite-plugin-node-polyfills": "^0.21.0",
75
72
  "vitepress": "^1.0.0-rc.42",
76
- "webpack-node-externals": "^2.5.2"
73
+ "vue-docgen-api": "^4.79.2"
77
74
  },
78
75
  "eslintConfig": {
79
76
  "root": true,
@@ -92,8 +89,5 @@
92
89
  "browserslist": [
93
90
  "> 1%",
94
91
  "last 2 versions"
95
- ],
96
- "optionalDependencies": {
97
- "@rollup/rollup-linux-x64-gnu": "^4.21.1"
98
- }
92
+ ]
99
93
  }
package/src/App.vue CHANGED
@@ -28,7 +28,6 @@
28
28
  :format="format"
29
29
  :marker-labels="markerLabels"
30
30
  :enableLocalAnnotations="false"
31
- :sparcAPI="sparcAPI"
32
31
  @open-map="openMap"
33
32
  @on-ready="onReady"
34
33
  @scaffold-selected="onSelected"
@@ -322,9 +321,6 @@ import {
322
321
  import { useRoute, useRouter } from 'vue-router'
323
322
  import { HelpModeDialog } from '@abi-software/map-utilities'
324
323
  import '@abi-software/map-utilities/dist/style.css'
325
- import { mapStores } from 'pinia';
326
- import { useSettingsStore } from '@/stores/settings';
327
- import { getOrganCuries } from '@/services/scicrunchQueries'
328
324
 
329
325
  let texture_prefix = undefined;
330
326
 
@@ -362,7 +358,7 @@ export default {
362
358
  },
363
359
  data: function () {
364
360
  return {
365
- consoleOn: false,
361
+ consoleOn: true,
366
362
  createLinesWithNormal: false,
367
363
  url: undefined,
368
364
  input: undefined,
@@ -410,13 +406,9 @@ export default {
410
406
  router: useRouter(),
411
407
  ElIconSetting: shallowRef(ElIconSetting),
412
408
  ElIconFolderOpened: shallowRef(ElIconFolderOpened),
413
- auto: NaN,
414
- sparcAPI: import.meta.env.VITE_SPARC_API,
409
+ auto: NaN
415
410
  };
416
411
  },
417
- computed: {
418
- ...mapStores(useSettingsStore),
419
- },
420
412
  watch: {
421
413
  input: function () {
422
414
  this.parseInput();
@@ -430,7 +422,7 @@ export default {
430
422
  "body proper": 9,
431
423
  "Spinal cord": 8,
432
424
  "lung": 11,
433
- "stomach": 12,
425
+ "stomach": {number:12, imgURL: 'https://mapcore-bucket1.s3.us-west-2.amazonaws.com/texture/arm1/jpg/0984.jpg'},
434
426
  "urinary bladder": 11,
435
427
  "Brainstem": 11,
436
428
  "heart": 9,
@@ -462,9 +454,6 @@ export default {
462
454
  },
463
455
  mounted: function () {
464
456
  this._objects = [];
465
- if (this.sparcAPI) {
466
- getOrganCuries(this.sparcAPI).then((organCuries) => this.settingsStore.updateOrganCuries(organCuries))
467
- }
468
457
  },
469
458
  created: function () {
470
459
  texture_prefix = import.meta.env.VITE_TEXTURE_FOOT_PREFIX;
@@ -14,7 +14,7 @@
14
14
  <template #default>
15
15
  <div class="tooltip-text">{{ label }}</div>
16
16
  <div class="tooltip-text" v-if="region">Region: {{ region }}</div>
17
- <CreateTooltipContent
17
+ <CreateTooltiipContent
18
18
  v-show="createData.toBeConfirmed"
19
19
  :createData="createData"
20
20
  @confirm-create="$emit('confirm-create', $event)"
@@ -22,14 +22,10 @@
22
22
  />
23
23
  <Tooltip
24
24
  class="p-tooltip"
25
- v-show="
26
- (annotationDisplay && !createData.toBeConfirmed) ||
27
- imageEntry.length
28
- "
29
- ref="tooltip"
30
- :tooltipType="annotationDisplay ? 'annotation' : 'image'"
25
+ v-show="annotationDisplay && !createData.toBeConfirmed"
26
+ ref="annotationTooltip"
27
+ :annotationDisplay="true"
31
28
  :annotationEntry="annotationEntry"
32
- :imageEntry="imageEntry"
33
29
  />
34
30
  <div v-if="createData.toBeDeleted" class="delete-container">
35
31
  <el-row>
@@ -70,9 +66,9 @@ import {
70
66
  import {
71
67
  Delete as ElIconDelete,
72
68
  } from '@element-plus/icons-vue'
69
+ import CreateTooltiipContent from "./CreateTooltipContent.vue";
73
70
  import { mapState } from 'pinia';
74
- import { useMainStore } from "@/stores/index";
75
- import CreateTooltipContent from "./CreateTooltipContent.vue";
71
+ import { useMainStore } from "@/store/index";
76
72
  import { Tooltip } from '@abi-software/map-utilities'
77
73
  import '@abi-software/map-utilities/dist/style.css'
78
74
 
@@ -83,7 +79,7 @@ export default {
83
79
  name: "ScaffoldTooltip",
84
80
  components: {
85
81
  Col,
86
- CreateTooltipContent,
82
+ CreateTooltiipContent,
87
83
  ElIconDelete,
88
84
  Icon,
89
85
  Popover,
@@ -125,14 +121,6 @@ export default {
125
121
  type: Number,
126
122
  default: 200,
127
123
  },
128
- imageThumbnails: {
129
- type: Object,
130
- default: {},
131
- },
132
- imageThumbnailSidebar: {
133
- type: Boolean,
134
- default: false,
135
- },
136
124
  },
137
125
  inject: ['scaffoldUrl'],
138
126
  provide() {
@@ -142,6 +130,7 @@ export default {
142
130
  },
143
131
  data: function () {
144
132
  return {
133
+ display: false,
145
134
  annotationEntry: { },
146
135
  ElIconDelete: shallowRef(ElIconDelete),
147
136
  };
@@ -156,27 +145,11 @@ export default {
156
145
  const x = this.x - 40;
157
146
  return { left: x + "px", top: this.y - yOffset + "px" };
158
147
  },
159
- imageEntry: function () {
160
- let imageEntries = []
161
- const imageThumbnailsEntries = Object.assign({},
162
- Object.fromEntries(
163
- Object.entries(this.imageThumbnails)
164
- .filter(([key, value]) => value.length > 0)
165
- .map(([key, value]) => [key.toLowerCase(), value])))
166
- const lowerCaseLabel = this.label.toLowerCase()
167
- if (lowerCaseLabel in imageThumbnailsEntries) {
168
- imageEntries = imageThumbnailsEntries[lowerCaseLabel];
169
- }
170
- if (this.imageThumbnailSidebar) {
171
- this.$emit('image-thumbnail-open', imageEntries)
172
- return [];
173
- }
174
- return imageEntries;
175
- },
176
148
  },
177
149
  methods: {
178
150
  checkForDisplay: function () {
179
151
  if (this.visible && this.label && this.label !== "") {
152
+ this.display = true;
180
153
  if (this.annotationDisplay) {
181
154
  const region = this.region ? this.region +"/" : "";
182
155
  this.annotationEntry = {
@@ -185,7 +158,9 @@ export default {
185
158
  "resource": encodeURIComponent(this.scaffoldUrl),
186
159
  };
187
160
  }
188
- } else {
161
+ }
162
+ else {
163
+ this.display = false;
189
164
  this.annotationEntry = { };
190
165
  }
191
166
  },