@abi-software/scaffoldvuer 1.6.2-wc → 1.7.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/dist/scaffoldvuer.js +43592 -0
- package/dist/scaffoldvuer.umd.cjs +3458 -0
- package/dist/style.css +1 -1
- package/package.json +3 -5
- package/src/ScaffoldVuer-wc.js +5 -13
- package/src/components/ScaffoldVuer.vue +14 -21
- package/dist/scaffoldvuer-wc.js +0 -78810
- package/dist/scaffoldvuer-wc.umd.cjs +0 -4334
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/scaffoldvuer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"serve": "vite --host --force",
|
|
11
11
|
"build-bundle": "vite build",
|
|
12
|
-
"build-wc": "vite build -c vite.web-component.js",
|
|
13
12
|
"build-static": "vite build -c vite.static-build.js",
|
|
14
13
|
"vuese-gen": "node vuese-generator.js",
|
|
15
14
|
"vuese-watch": "node vuese-generator.js watch",
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
"*.js"
|
|
43
42
|
],
|
|
44
43
|
"dependencies": {
|
|
45
|
-
"@abi-software/map-utilities": "^1.
|
|
44
|
+
"@abi-software/map-utilities": "^1.3.0",
|
|
46
45
|
"@abi-software/sparc-annotation": "^0.3.1",
|
|
47
46
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
48
47
|
"@element-plus/icons-vue": "^2.3.1",
|
|
@@ -71,8 +70,7 @@
|
|
|
71
70
|
"vite": "^5.0.10",
|
|
72
71
|
"vite-plugin-node-polyfills": "^0.21.0",
|
|
73
72
|
"vitepress": "^1.0.0-rc.42",
|
|
74
|
-
"vue-docgen-api": "^4.79.2"
|
|
75
|
-
"vue-web-component-wrapper": "^1.6.9"
|
|
73
|
+
"vue-docgen-api": "^4.79.2"
|
|
76
74
|
},
|
|
77
75
|
"eslintConfig": {
|
|
78
76
|
"root": true,
|
package/src/ScaffoldVuer-wc.js
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { useMainStore } from '@/store/index'
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import vueCustomElement from 'vue-custom-element';
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
Vue.use(vueCustomElement);
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
const mainStore = useMainStore();
|
|
9
|
-
const token = document.cookie.split("; ").find((row) => row.startsWith("user-token"));
|
|
10
|
-
if (mainStore && token) {
|
|
11
|
-
mainStore.setUserToken(token.split("=")[1]);
|
|
12
|
-
}
|
|
6
|
+
import ScaffoldVuer from "./components/ScaffoldVuer.vue";
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
customElements.define("scaffoldvuer-wc", ScaffoldVuer);
|
|
8
|
+
Vue.customElement("scaffoldvuer-wc", ScaffoldVuer);
|
|
17
9
|
|
|
18
10
|
/*
|
|
19
11
|
const wrappedElement = wrap(Vue, ScaffoldVuer);
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
</template>
|
|
309
309
|
</div>
|
|
310
310
|
<el-row class="viewing-mode-description">
|
|
311
|
-
{{
|
|
311
|
+
{{ modeDescription }}
|
|
312
312
|
</el-row>
|
|
313
313
|
</el-row>
|
|
314
314
|
<el-row class="backgroundSpacer"></el-row>
|
|
@@ -805,7 +805,7 @@ export default {
|
|
|
805
805
|
viewingMode: "Exploration",
|
|
806
806
|
viewingModes: {
|
|
807
807
|
"Exploration": "View and explore detailed visualization of 3D scaffolds",
|
|
808
|
-
"Annotation":
|
|
808
|
+
"Annotation": ['View feature annotations', 'Add, comment on and view feature annotations'],
|
|
809
809
|
},
|
|
810
810
|
openMapRef: undefined,
|
|
811
811
|
backgroundIconRef: undefined,
|
|
@@ -918,24 +918,6 @@ export default {
|
|
|
918
918
|
}
|
|
919
919
|
this.previousMarkerLabels = markRaw({...labels});
|
|
920
920
|
},
|
|
921
|
-
annotationDisplay: function(value) {
|
|
922
|
-
if (this.annotationSidebar) {
|
|
923
|
-
if (value) {
|
|
924
|
-
const region = this.tData.region ? this.tData.region +"/" : "";
|
|
925
|
-
const annotationEntry = {
|
|
926
|
-
"featureId": region + this.tData.label,
|
|
927
|
-
"resourceId": this.url,
|
|
928
|
-
"resource": this.url,
|
|
929
|
-
};
|
|
930
|
-
this.$emit('annotation-open', {annotationEntry: annotationEntry,
|
|
931
|
-
commitCallback: this.commitAnnotationEvent});
|
|
932
|
-
} else {
|
|
933
|
-
if (!this.createData.toBeConfirmed || !this.createData.toBeDeleted) {
|
|
934
|
-
this.$emit("annotation-close");
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
921
|
},
|
|
940
922
|
beforeCreate: function () {
|
|
941
923
|
this.$module = new OrgansViewer();
|
|
@@ -977,7 +959,17 @@ export default {
|
|
|
977
959
|
annotationDisplay: function() {
|
|
978
960
|
return this.viewingMode === 'Annotation' && this.tData.active === true &&
|
|
979
961
|
(this.activeDrawMode !== "Point" && this.activeDrawMode !== 'LineString');
|
|
980
|
-
}
|
|
962
|
+
},
|
|
963
|
+
modeDescription: function () {
|
|
964
|
+
let description = this.viewingModes[this.viewingMode];
|
|
965
|
+
if (this.viewingMode === 'Annotation') {
|
|
966
|
+
if (this.userInformation) {
|
|
967
|
+
return description[1]
|
|
968
|
+
}
|
|
969
|
+
return description[0]
|
|
970
|
+
};
|
|
971
|
+
return description;
|
|
972
|
+
},
|
|
981
973
|
},
|
|
982
974
|
methods: {
|
|
983
975
|
/**
|
|
@@ -1337,6 +1329,7 @@ export default {
|
|
|
1337
1329
|
this.createData.shape = '';
|
|
1338
1330
|
this.$module.selectObjectOnPick = true;
|
|
1339
1331
|
} else if (type === 'tool') {
|
|
1332
|
+
if (this.annotationDisplay) return;
|
|
1340
1333
|
this.activeDrawTool = icon;
|
|
1341
1334
|
this.createData.shape = this.activeDrawTool ? this.activeDrawTool : '';
|
|
1342
1335
|
this.$module.selectObjectOnPick = false;
|