@abi-software/map-utilities 1.2.1 → 1.2.2-beta.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/package.json
CHANGED
|
@@ -4,18 +4,12 @@
|
|
|
4
4
|
<el-col>
|
|
5
5
|
<el-row v-if="inDrawing">
|
|
6
6
|
<span class="dialog-title">Finalise drawing</span>
|
|
7
|
-
<el-button
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Confirm
|
|
14
|
-
</el-button>
|
|
15
|
-
<el-button type="primary" plain @click="$emit('cancelDrawn', true)">
|
|
16
|
-
Cancel
|
|
17
|
-
</el-button>
|
|
18
|
-
</el-button-group>
|
|
7
|
+
<el-button type="primary" plain @click="$emit('confirmDrawn', true)">
|
|
8
|
+
Confirm
|
|
9
|
+
</el-button>
|
|
10
|
+
<el-button type="primary" plain @click="$emit('cancelDrawn', true)">
|
|
11
|
+
Cancel
|
|
12
|
+
</el-button>
|
|
19
13
|
</el-row>
|
|
20
14
|
<el-row v-else>
|
|
21
15
|
<span class="dialog-title">Visualise connection</span>
|
|
@@ -34,7 +28,18 @@
|
|
|
34
28
|
<b><span>Related Features</span></b>
|
|
35
29
|
<el-row v-for="(value, key) in connectionEntry" :key="key">
|
|
36
30
|
<el-card :shadow="shadowDisplay(key)" @click="handleTooltip(key)">
|
|
37
|
-
<
|
|
31
|
+
<el-popover
|
|
32
|
+
trigger="hover"
|
|
33
|
+
:disabled="value.label.length < 20"
|
|
34
|
+
:width="200"
|
|
35
|
+
:content="capitalise(value.label)"
|
|
36
|
+
>
|
|
37
|
+
<template #reference>
|
|
38
|
+
<span class="connection-label">{{
|
|
39
|
+
capitalise(value.label)
|
|
40
|
+
}}</span>
|
|
41
|
+
</template>
|
|
42
|
+
</el-popover>
|
|
38
43
|
</el-card>
|
|
39
44
|
</el-row>
|
|
40
45
|
</el-col>
|
|
@@ -100,13 +105,13 @@ export default {
|
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
.dialog-title {
|
|
103
|
-
font-size:
|
|
108
|
+
font-size: 16px;
|
|
104
109
|
font-weight: bold;
|
|
105
110
|
color: rgb(131, 0, 191);
|
|
106
111
|
}
|
|
107
112
|
|
|
108
113
|
.el-button {
|
|
109
|
-
margin: 5px
|
|
114
|
+
margin: 5px 5px 5px 0;
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
:deep(.el-card) {
|
|
@@ -115,4 +120,13 @@ export default {
|
|
|
115
120
|
border: 0;
|
|
116
121
|
cursor: pointer;
|
|
117
122
|
}
|
|
123
|
+
|
|
124
|
+
.connection-label {
|
|
125
|
+
white-space: nowrap;
|
|
126
|
+
display: block;
|
|
127
|
+
width: 200px;
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
text-overflow: ellipsis;
|
|
130
|
+
font-size: 14px;
|
|
131
|
+
}
|
|
118
132
|
</style>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<div class="block">
|
|
4
4
|
<el-row class="info-field">
|
|
5
5
|
<div class="title">Feature Annotations</div>
|
|
6
|
+
<copy-to-clipboard :content="updatedCopyContent" />
|
|
6
7
|
</el-row>
|
|
7
8
|
<template v-if="annotationEntry">
|
|
8
9
|
<el-row
|
|
@@ -11,7 +12,9 @@
|
|
|
11
12
|
class="dialog-text"
|
|
12
13
|
:key="key"
|
|
13
14
|
>
|
|
14
|
-
<strong>{{ label }}: </strong>
|
|
15
|
+
<strong>{{ label }}: </strong>
|
|
16
|
+
<span v-if="label !== 'Ontology'">{{ annotationEntry[key] }}</span>
|
|
17
|
+
<a v-else :href="ontologyLink" target="_blank">{{ annotationEntry[key] }}</a>
|
|
15
18
|
</el-row>
|
|
16
19
|
<template v-if="prevSubs.length > 0">
|
|
17
20
|
<div
|
|
@@ -158,8 +161,8 @@ export default {
|
|
|
158
161
|
return {
|
|
159
162
|
displayPair: {
|
|
160
163
|
"Feature ID": "featureId",
|
|
161
|
-
|
|
162
|
-
|
|
164
|
+
Label: "label",
|
|
165
|
+
Ontology: "models",
|
|
163
166
|
Name: "name",
|
|
164
167
|
Resource: "resourceId",
|
|
165
168
|
},
|
|
@@ -174,6 +177,7 @@ export default {
|
|
|
174
177
|
showSubmissions: true,
|
|
175
178
|
errorMessage: "",
|
|
176
179
|
creator: undefined,
|
|
180
|
+
copyContent: '',
|
|
177
181
|
};
|
|
178
182
|
},
|
|
179
183
|
computed: {
|
|
@@ -195,6 +199,15 @@ export default {
|
|
|
195
199
|
this.annotationEntry["type"] === "deleted"
|
|
196
200
|
);
|
|
197
201
|
},
|
|
202
|
+
ontologyLink: function () {
|
|
203
|
+
const models = this.annotationEntry['models'];
|
|
204
|
+
if (models && models.startsWith("UBERON")) {
|
|
205
|
+
return `http://purl.obolibrary.org/obo/${this.annotationEntry.models.replace(":", "_")}`;
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
updatedCopyContent: function () {
|
|
209
|
+
return this.getUpdateCopyContent();
|
|
210
|
+
},
|
|
198
211
|
},
|
|
199
212
|
methods: {
|
|
200
213
|
evidenceEntered: function (value) {
|
|
@@ -316,6 +329,50 @@ export default {
|
|
|
316
329
|
this.newFeature = "";
|
|
317
330
|
this.comment = "";
|
|
318
331
|
},
|
|
332
|
+
getUpdateCopyContent: function () {
|
|
333
|
+
if (!this.annotationEntry) {
|
|
334
|
+
return '';
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const contentArray = [];
|
|
338
|
+
|
|
339
|
+
// featureId
|
|
340
|
+
if (this.annotationEntry.featureId) {
|
|
341
|
+
contentArray.push(`<div><strong>Feature ID:</strong>${this.annotationEntry.featureId}</div>`);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// label
|
|
345
|
+
if (this.annotationEntry.label) {
|
|
346
|
+
contentArray.push(`<div><strong>Label:</strong>${this.annotationEntry.label}</div>`);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// models
|
|
350
|
+
if (this.annotationEntry.models) {
|
|
351
|
+
contentArray.push(`<div><strong>Ontology:</strong>${this.annotationEntry.models}</div>`);
|
|
352
|
+
if (this.ontologyLink) {
|
|
353
|
+
contentArray.push(`<div><strong>Ontology Link:</strong>${this.ontologyLink}</div>`);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// resourceId
|
|
358
|
+
if (this.annotationEntry.resourceId) {
|
|
359
|
+
contentArray.push(`<div><strong>Resource:</strong>${this.annotationEntry.resourceId}</div>`);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
if (this.prevSubs.length) {
|
|
363
|
+
let annotationContent = '<div><strong>Annotations:</strong></div>\n<br>';
|
|
364
|
+
this.prevSubs.map((sub, index) => {
|
|
365
|
+
annotationContent += `<div><strong>Created:</strong>${this.formatTime(sub.created)}</div>\n<br>`;
|
|
366
|
+
annotationContent += `<div><strong>Creator:</strong>${sub.creator.name}</div>\n<br>`;
|
|
367
|
+
annotationContent += `<div><strong>Contact:</strong>${sub.creator.email}</div>\n<br>`;
|
|
368
|
+
annotationContent += `<div><strong>Evidence:</strong>${sub.body.evidence.join(', ')}</div>\n<br>`;
|
|
369
|
+
annotationContent += `<div><strong>Comment:</strong>${sub.body.comment}</div>\n<br>`;
|
|
370
|
+
})
|
|
371
|
+
contentArray.push(`<div>${annotationContent}</div>`);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
return contentArray.join('\n\n<br>');
|
|
375
|
+
},
|
|
319
376
|
},
|
|
320
377
|
watch: {
|
|
321
378
|
annotationEntry: {
|
package/src/components.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ declare module 'vue' {
|
|
|
14
14
|
CreateTooltipContent: typeof import('./components/Tooltip/CreateTooltipContent.vue')['default']
|
|
15
15
|
DrawToolbar: typeof import('./components/DrawToolbar/DrawToolbar.vue')['default']
|
|
16
16
|
ElButton: typeof import('element-plus/es')['ElButton']
|
|
17
|
-
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
|
18
17
|
ElCard: typeof import('element-plus/es')['ElCard']
|
|
19
18
|
ElCol: typeof import('element-plus/es')['ElCol']
|
|
20
19
|
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|