@abi-software/flatmapvuer 0.5.9 → 0.6.0-vue3-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/babel.config.js +0 -14
- package/dist/favicon.ico +0 -0
- package/dist/flatmapvuer.js +69542 -0
- package/dist/flatmapvuer.umd.cjs +1021 -0
- package/dist/index.html +17 -0
- package/dist/style.css +1 -0
- package/package.json +29 -21
- package/src/App.vue +180 -105
- package/src/assets/styles.scss +2 -3
- package/src/components/AnnotationTool.vue +193 -153
- package/src/components/EventBus.js +3 -3
- package/src/components/ExternalResourceCard.vue +39 -30
- package/src/components/FlatmapVuer.vue +734 -676
- package/src/components/MultiFlatmapVuer.vue +313 -246
- package/src/components/ProvenancePopup.vue +195 -121
- package/src/components/SelectionsGroup.vue +93 -84
- package/src/components/Tooltip.vue +11 -13
- package/src/components/TreeControls.vue +67 -64
- package/src/components/index.js +4 -7
- package/src/components/legends/DynamicLegends.vue +13 -19
- package/src/components/legends/SvgLegends.vue +72 -27
- package/src/components.d.ts +46 -0
- package/src/icons/flatmap-marker.js +1 -1
- package/src/icons/fonts/mapicon-species.eot +0 -0
- package/src/icons/fonts/mapicon-species.svg +0 -0
- package/src/icons/yellowstar.js +2 -2
- package/src/legends/legend.svg +0 -0
- package/src/main.js +2 -6
- package/src/services/flatmapQueries.js +175 -139
- package/vite.config.js +76 -0
- package/vue.config.js +14 -0
- package/CHANGELOG.md +0 -402
- package/dist/demo.html +0 -10
- package/dist/flatmapvuer.common.js +0 -22741
- package/dist/flatmapvuer.common.js.map +0 -1
- package/dist/flatmapvuer.css +0 -1
- package/dist/flatmapvuer.umd.js +0 -22751
- package/dist/flatmapvuer.umd.js.map +0 -1
- package/dist/flatmapvuer.umd.min.js +0 -4
- package/dist/flatmapvuer.umd.min.js.map +0 -1
- package/package-lock.json +0 -18473
|
@@ -11,16 +11,24 @@
|
|
|
11
11
|
class="dialog-text"
|
|
12
12
|
:key="key"
|
|
13
13
|
>
|
|
14
|
-
|
|
14
|
+
<strong>{{ label }}: </strong> {{ annotationEntry[key] }}
|
|
15
15
|
</el-row>
|
|
16
16
|
<template v-if="prevSubs.length > 0">
|
|
17
|
-
<div
|
|
17
|
+
<div
|
|
18
|
+
v-show="showSubmissions"
|
|
19
|
+
class="hide"
|
|
20
|
+
@click="showSubmissions = false"
|
|
21
|
+
>
|
|
18
22
|
Hide previous submissions
|
|
19
|
-
<
|
|
23
|
+
<el-icon><el-icon-arrow-up /></el-icon>
|
|
20
24
|
</div>
|
|
21
|
-
<div
|
|
25
|
+
<div
|
|
26
|
+
v-show="!showSubmissions"
|
|
27
|
+
class="hide"
|
|
28
|
+
@click="showSubmissions = true"
|
|
29
|
+
>
|
|
22
30
|
Show previous {{ prevSubs.length }} submission(s)
|
|
23
|
-
<
|
|
31
|
+
<el-icon><el-icon-arrow-down /></el-icon>
|
|
24
32
|
</div>
|
|
25
33
|
<template v-if="showSubmissions">
|
|
26
34
|
<el-row class="dialog-spacer"></el-row>
|
|
@@ -29,12 +37,17 @@
|
|
|
29
37
|
</el-row>
|
|
30
38
|
<div class="entry" v-for="(sub, index) in prevSubs" :key="index">
|
|
31
39
|
<el-row class="dialog-text">
|
|
32
|
-
<strong>{{ formatTime(sub.created) }}</strong>
|
|
40
|
+
<strong>{{ formatTime(sub.created) }}</strong>
|
|
41
|
+
{{ sub.creator.name }}
|
|
33
42
|
</el-row>
|
|
34
43
|
<el-row class="dialog-text">
|
|
35
|
-
<strong>Evidence: </strong>
|
|
36
|
-
<el-row
|
|
37
|
-
|
|
44
|
+
<strong>Evidence: </strong>
|
|
45
|
+
<el-row
|
|
46
|
+
v-for="evidence in sub.evidence"
|
|
47
|
+
:key="evidence"
|
|
48
|
+
class="dialog-text"
|
|
49
|
+
>
|
|
50
|
+
<a :href="evidence" target="_blank"> {{ evidence }}</a>
|
|
38
51
|
</el-row>
|
|
39
52
|
</el-row>
|
|
40
53
|
<el-row class="dialog-text">
|
|
@@ -47,10 +60,7 @@
|
|
|
47
60
|
<template v-if="isEditable">
|
|
48
61
|
<el-row class="dialog-spacer"></el-row>
|
|
49
62
|
<el-row v-if="!editing">
|
|
50
|
-
<
|
|
51
|
-
class="el-icon-edit standard-icon"
|
|
52
|
-
@click="editing = true"
|
|
53
|
-
/>
|
|
63
|
+
<el-icon class="standard-icon"><el-icon-edit /></el-icon>
|
|
54
64
|
</el-row>
|
|
55
65
|
<template v-else>
|
|
56
66
|
<el-row class="dialog-text">
|
|
@@ -60,14 +70,11 @@
|
|
|
60
70
|
<strong>Evidvence:</strong>
|
|
61
71
|
</el-row>
|
|
62
72
|
<el-row v-for="(value, index) in evidence" :key="value">
|
|
63
|
-
<el-col :span="20">
|
|
73
|
+
<el-col :span="20">
|
|
64
74
|
{{ evidence[index] }}
|
|
65
75
|
</el-col>
|
|
66
76
|
<el-col :span="4">
|
|
67
|
-
<
|
|
68
|
-
class="el-icon-close standard-icon"
|
|
69
|
-
@click="removeEvidence(index)"
|
|
70
|
-
/>
|
|
77
|
+
<el-icon class="standard-icon"><el-icon-close /></el-icon>
|
|
71
78
|
</el-col>
|
|
72
79
|
</el-row>
|
|
73
80
|
<el-row>
|
|
@@ -77,20 +84,26 @@
|
|
|
77
84
|
v-model="newEvidence"
|
|
78
85
|
@change="evidenceEntered($event)"
|
|
79
86
|
>
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
<template #prepend>
|
|
88
|
+
<el-select
|
|
89
|
+
:teleported="false"
|
|
90
|
+
v-model="evidencePrefix"
|
|
91
|
+
placeholder="Select"
|
|
92
|
+
class="select-box"
|
|
93
|
+
popper-class="flatmap_dropdown"
|
|
94
|
+
>
|
|
95
|
+
<el-option
|
|
96
|
+
v-for="item in evidencePrefixes"
|
|
97
|
+
:key="item"
|
|
98
|
+
:label="item"
|
|
99
|
+
:value="item"
|
|
100
|
+
>
|
|
101
|
+
<el-row>
|
|
102
|
+
<el-col :span="12">{{ item }}</el-col>
|
|
103
|
+
</el-row>
|
|
104
|
+
</el-option>
|
|
105
|
+
</el-select>
|
|
106
|
+
</template>
|
|
94
107
|
</el-input>
|
|
95
108
|
</el-row>
|
|
96
109
|
<el-row>
|
|
@@ -99,25 +112,19 @@
|
|
|
99
112
|
<el-row class="dialog-text">
|
|
100
113
|
<el-input
|
|
101
114
|
type="textarea"
|
|
102
|
-
:autosize="{ minRows: 2, maxRows: 4}"
|
|
115
|
+
:autosize="{ minRows: 2, maxRows: 4 }"
|
|
103
116
|
placeholder="Enter"
|
|
104
117
|
v-model="comment"
|
|
105
118
|
/>
|
|
106
119
|
</el-row>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
plain
|
|
112
|
-
@click="submit"
|
|
113
|
-
>
|
|
114
|
-
Submit
|
|
115
|
-
</el-button>
|
|
120
|
+
<el-row class="dialog-text">
|
|
121
|
+
<el-button class="button" type="primary" plain @click="submit">
|
|
122
|
+
Submit
|
|
123
|
+
</el-button>
|
|
116
124
|
</el-row>
|
|
117
125
|
</template>
|
|
118
126
|
<el-row class="dialog-text" v-if="errorMessage">
|
|
119
|
-
<strong class="sub-title"> {{ errorMessage }}
|
|
120
|
-
</strong>
|
|
127
|
+
<strong class="sub-title"> {{ errorMessage }} </strong>
|
|
121
128
|
</el-row>
|
|
122
129
|
</template>
|
|
123
130
|
</template>
|
|
@@ -126,165 +133,198 @@
|
|
|
126
133
|
</el-main>
|
|
127
134
|
</template>
|
|
128
135
|
|
|
129
|
-
|
|
130
136
|
<script>
|
|
137
|
+
import {
|
|
138
|
+
ArrowUp as ElIconArrowUp,
|
|
139
|
+
ArrowDown as ElIconArrowDown,
|
|
140
|
+
Edit as ElIconEdit,
|
|
141
|
+
Close as ElIconClose,
|
|
142
|
+
} from '@element-plus/icons-vue'
|
|
131
143
|
/* eslint-disable no-alert, no-console */
|
|
132
144
|
/* eslint-disable no-alert, no-console */
|
|
133
|
-
import
|
|
134
|
-
import {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
Vue.use(Input);
|
|
143
|
-
Vue.use(Main);
|
|
144
|
-
Vue.use(Row);
|
|
145
|
-
Vue.use(Select);
|
|
145
|
+
import { AnnotationService } from '@abi-software/sparc-annotation'
|
|
146
|
+
import {
|
|
147
|
+
ElButton as Button,
|
|
148
|
+
ElCol as Col,
|
|
149
|
+
ElInput as Input,
|
|
150
|
+
ElMain as Main,
|
|
151
|
+
ElRow as Row,
|
|
152
|
+
ElSelect as Select,
|
|
153
|
+
} from 'element-plus'
|
|
146
154
|
|
|
147
155
|
export default {
|
|
148
|
-
name:
|
|
156
|
+
name: 'AnnotationTool',
|
|
157
|
+
components: {
|
|
158
|
+
Button,
|
|
159
|
+
Col,
|
|
160
|
+
Input,
|
|
161
|
+
Main,
|
|
162
|
+
Row,
|
|
163
|
+
Select,
|
|
164
|
+
ElIconArrowUp,
|
|
165
|
+
ElIconArrowDown,
|
|
166
|
+
ElIconEdit,
|
|
167
|
+
ElIconClose,
|
|
168
|
+
},
|
|
149
169
|
props: {
|
|
150
170
|
annotationEntry: {
|
|
151
171
|
type: Object,
|
|
152
172
|
},
|
|
153
173
|
},
|
|
154
174
|
inject: ['flatmapAPI'],
|
|
155
|
-
data: function() {
|
|
175
|
+
data: function () {
|
|
156
176
|
return {
|
|
157
177
|
displayPair: {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
178
|
+
'Feature ID': 'featureId',
|
|
179
|
+
Tooltip: 'label',
|
|
180
|
+
Models: 'models',
|
|
181
|
+
Name: 'name',
|
|
182
|
+
Resource: 'resourceId',
|
|
163
183
|
},
|
|
164
184
|
editing: false,
|
|
165
|
-
evidencePrefixes:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
],
|
|
169
|
-
evidencePrefix: "DOI:",
|
|
170
|
-
evidence: [ ],
|
|
185
|
+
evidencePrefixes: ['DOI:', 'PMID:'],
|
|
186
|
+
evidencePrefix: 'DOI:',
|
|
187
|
+
evidence: [],
|
|
171
188
|
authenticated: false,
|
|
172
189
|
newEvidence: '',
|
|
173
190
|
comment: '',
|
|
174
|
-
prevSubs: [
|
|
191
|
+
prevSubs: [],
|
|
175
192
|
showSubmissions: true,
|
|
176
|
-
errorMessage:
|
|
193
|
+
errorMessage: '',
|
|
177
194
|
}
|
|
178
195
|
},
|
|
179
196
|
computed: {
|
|
180
|
-
isEditable: function() {
|
|
181
|
-
return
|
|
197
|
+
isEditable: function () {
|
|
198
|
+
return (
|
|
199
|
+
this.annotationEntry['resourceId'] && this.annotationEntry['featureId']
|
|
200
|
+
)
|
|
182
201
|
},
|
|
183
202
|
},
|
|
184
203
|
methods: {
|
|
185
|
-
evidenceEntered: function(value) {
|
|
204
|
+
evidenceEntered: function (value) {
|
|
186
205
|
if (value) {
|
|
187
|
-
this.evidence.push(this.evidencePrefix + value)
|
|
188
|
-
this.newEvidence =
|
|
206
|
+
this.evidence.push(this.evidencePrefix + value)
|
|
207
|
+
this.newEvidence = ''
|
|
189
208
|
}
|
|
190
209
|
},
|
|
191
|
-
formatTime: function(dateString) {
|
|
192
|
-
const options = {
|
|
193
|
-
|
|
194
|
-
|
|
210
|
+
formatTime: function (dateString) {
|
|
211
|
+
const options = {
|
|
212
|
+
year: 'numeric',
|
|
213
|
+
month: 'long',
|
|
214
|
+
day: 'numeric',
|
|
215
|
+
hour: 'numeric',
|
|
216
|
+
minute: 'numeric',
|
|
217
|
+
second: 'numeric',
|
|
218
|
+
}
|
|
219
|
+
return new Date(dateString).toLocaleDateString(undefined, options)
|
|
195
220
|
},
|
|
196
|
-
updatePrevSubmissions: function() {
|
|
221
|
+
updatePrevSubmissions: function () {
|
|
197
222
|
if (this.$annotator && this.authenticated) {
|
|
198
|
-
if (
|
|
199
|
-
this.annotationEntry['
|
|
200
|
-
this
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
223
|
+
if (
|
|
224
|
+
this.annotationEntry['resourceId'] &&
|
|
225
|
+
this.annotationEntry['featureId']
|
|
226
|
+
) {
|
|
227
|
+
this.$annotator
|
|
228
|
+
.itemAnnotations(
|
|
229
|
+
this.annotationEntry['resourceId'],
|
|
230
|
+
this.annotationEntry['featureId']
|
|
231
|
+
)
|
|
232
|
+
.then((value) => {
|
|
233
|
+
this.prevSubs = value
|
|
234
|
+
})
|
|
235
|
+
.catch((reason) => {
|
|
236
|
+
console.log(reason) // Error!
|
|
237
|
+
})
|
|
207
238
|
}
|
|
208
239
|
}
|
|
209
240
|
},
|
|
210
|
-
submit: function() {
|
|
211
|
-
if (
|
|
212
|
-
if (
|
|
213
|
-
this.annotationEntry['
|
|
214
|
-
|
|
241
|
+
submit: function () {
|
|
242
|
+
if (this.evidence.length > 0 || this.comment) {
|
|
243
|
+
if (
|
|
244
|
+
this.annotationEntry['resourceId'] &&
|
|
245
|
+
this.annotationEntry['featureId']
|
|
246
|
+
) {
|
|
247
|
+
const evidenceURLs = []
|
|
215
248
|
this.evidence.forEach((evidence) => {
|
|
216
|
-
if (evidence.includes(
|
|
217
|
-
const link = evidence.replace(
|
|
218
|
-
evidenceURLs.push(new URL(link))
|
|
219
|
-
} else if (evidence.includes(
|
|
220
|
-
const link = evidence.replace(
|
|
221
|
-
|
|
249
|
+
if (evidence.includes('DOI:')) {
|
|
250
|
+
const link = evidence.replace('DOI:', 'https://doi.org/')
|
|
251
|
+
evidenceURLs.push(new URL(link))
|
|
252
|
+
} else if (evidence.includes('PMID:')) {
|
|
253
|
+
const link = evidence.replace(
|
|
254
|
+
'PMID:',
|
|
255
|
+
'https://pubmed.ncbi.nlm.nih.gov/'
|
|
256
|
+
)
|
|
257
|
+
evidenceURLs.push(new URL(link))
|
|
222
258
|
}
|
|
223
|
-
})
|
|
259
|
+
})
|
|
224
260
|
const userAnnotation = {
|
|
225
261
|
resource: this.annotationEntry['resourceId'],
|
|
226
262
|
item: this.annotationEntry['featureId'],
|
|
227
263
|
evidence: evidenceURLs,
|
|
228
264
|
comment: this.comment,
|
|
229
265
|
}
|
|
230
|
-
this.$annotator
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
266
|
+
this.$annotator
|
|
267
|
+
.addAnnotation(userAnnotation)
|
|
268
|
+
.then(() => {
|
|
269
|
+
this.errorMessage = ''
|
|
270
|
+
this.resetSubmission()
|
|
271
|
+
this.updatePrevSubmissions()
|
|
272
|
+
})
|
|
273
|
+
.catch(() => {
|
|
274
|
+
this.errorMessage =
|
|
275
|
+
'There is a problem with the submission, please try again later'
|
|
276
|
+
})
|
|
238
277
|
}
|
|
239
278
|
}
|
|
240
279
|
},
|
|
241
|
-
removeEvidence: function(index) {
|
|
242
|
-
this.evidence.splice(index, 1)
|
|
280
|
+
removeEvidence: function (index) {
|
|
281
|
+
this.evidence.splice(index, 1)
|
|
243
282
|
},
|
|
244
|
-
resetSubmission: function() {
|
|
245
|
-
this.editing = false
|
|
246
|
-
this.evidence = []
|
|
247
|
-
this.newFeature = ''
|
|
248
|
-
this.comment = ''
|
|
283
|
+
resetSubmission: function () {
|
|
284
|
+
this.editing = false
|
|
285
|
+
this.evidence = []
|
|
286
|
+
this.newFeature = ''
|
|
287
|
+
this.comment = ''
|
|
249
288
|
},
|
|
250
289
|
},
|
|
251
290
|
watch: {
|
|
252
291
|
annotationEntry: {
|
|
253
|
-
handler: function() {
|
|
254
|
-
this.resetSubmission()
|
|
255
|
-
this.updatePrevSubmissions()
|
|
292
|
+
handler: function () {
|
|
293
|
+
this.resetSubmission()
|
|
294
|
+
this.updatePrevSubmissions()
|
|
256
295
|
},
|
|
257
296
|
immediate: false,
|
|
258
297
|
deep: false,
|
|
259
|
-
}
|
|
298
|
+
},
|
|
260
299
|
},
|
|
261
|
-
mounted: function() {
|
|
300
|
+
mounted: function () {
|
|
262
301
|
if (!this.$annotator) {
|
|
263
|
-
|
|
264
|
-
`${this.flatmapAPI}annotator`
|
|
302
|
+
this.$annotator = new AnnotationService(
|
|
303
|
+
`${this.flatmapAPI}annotator`
|
|
304
|
+
)
|
|
265
305
|
}
|
|
266
306
|
this.$annotator.authenticate().then((userData) => {
|
|
267
307
|
if (userData.name && userData.email) {
|
|
268
|
-
this.authenticated = true
|
|
269
|
-
this.updatePrevSubmissions()
|
|
308
|
+
this.authenticated = true
|
|
309
|
+
this.updatePrevSubmissions()
|
|
270
310
|
} else {
|
|
271
|
-
this.errorMessage =
|
|
311
|
+
this.errorMessage = ''
|
|
272
312
|
}
|
|
273
313
|
})
|
|
274
|
-
}
|
|
275
|
-
}
|
|
314
|
+
},
|
|
315
|
+
}
|
|
276
316
|
</script>
|
|
277
317
|
|
|
278
|
-
<style
|
|
279
|
-
@
|
|
280
|
-
@
|
|
281
|
-
@
|
|
282
|
-
@
|
|
283
|
-
@
|
|
284
|
-
@
|
|
318
|
+
<style lang="scss" scoped>
|
|
319
|
+
@use 'element-plus/theme-chalk/src/button';
|
|
320
|
+
@use 'element-plus/theme-chalk/src/col';
|
|
321
|
+
@use 'element-plus/theme-chalk/src/input';
|
|
322
|
+
@use 'element-plus/theme-chalk/src/main';
|
|
323
|
+
@use 'element-plus/theme-chalk/src/row';
|
|
324
|
+
@use 'element-plus/theme-chalk/src/select';
|
|
285
325
|
|
|
286
326
|
.info-field {
|
|
287
|
-
display:flex;
|
|
327
|
+
display: flex;
|
|
288
328
|
}
|
|
289
329
|
|
|
290
330
|
.block {
|
|
@@ -292,8 +332,8 @@ export default {
|
|
|
292
332
|
}
|
|
293
333
|
|
|
294
334
|
.button {
|
|
295
|
-
padding-top:5px;
|
|
296
|
-
padding-bottom:5px;
|
|
335
|
+
padding-top: 5px;
|
|
336
|
+
padding-bottom: 5px;
|
|
297
337
|
}
|
|
298
338
|
|
|
299
339
|
.standard-icon {
|
|
@@ -314,7 +354,7 @@ export default {
|
|
|
314
354
|
font-size: 14px;
|
|
315
355
|
text-align: left;
|
|
316
356
|
line-height: 1.5em;
|
|
317
|
-
font-family: Asap, sans-serif,Helvetica;
|
|
357
|
+
font-family: Asap, sans-serif, Helvetica;
|
|
318
358
|
font-weight: 400;
|
|
319
359
|
/* outline: thin red solid; */
|
|
320
360
|
padding: 1em !important;
|
|
@@ -346,7 +386,6 @@ export default {
|
|
|
346
386
|
font-size: 16px;
|
|
347
387
|
}
|
|
348
388
|
|
|
349
|
-
|
|
350
389
|
.dialog-spacer {
|
|
351
390
|
border-bottom: 1px solid #e4e7ed;
|
|
352
391
|
margin-bottom: 10px;
|
|
@@ -364,33 +403,34 @@ export default {
|
|
|
364
403
|
margin-top: 10px;
|
|
365
404
|
}
|
|
366
405
|
|
|
367
|
-
.hide{
|
|
406
|
+
.hide {
|
|
368
407
|
color: $app-primary-color;
|
|
369
408
|
cursor: pointer;
|
|
370
409
|
margin-right: 6px;
|
|
371
410
|
margin-top: 3px;
|
|
372
411
|
}
|
|
373
412
|
|
|
374
|
-
|
|
413
|
+
:deep(.el-input__inner),
|
|
414
|
+
:deep(.el-textarea__inner) {
|
|
375
415
|
font-family: Asap, sans-serif;
|
|
376
416
|
}
|
|
377
417
|
|
|
378
418
|
.select-box {
|
|
379
|
-
width:80px;
|
|
419
|
+
width: 80px;
|
|
380
420
|
background-color: var(--white);
|
|
381
421
|
font-weight: 500;
|
|
382
|
-
color:rgb(48, 49, 51)
|
|
383
|
-
|
|
384
|
-
height:30px;
|
|
422
|
+
color: rgb(48, 49, 51);
|
|
423
|
+
:deep(.el-input__inner) {
|
|
424
|
+
height: 30px;
|
|
385
425
|
color: rgb(48, 49, 51);
|
|
386
426
|
}
|
|
387
|
-
|
|
388
|
-
line-height:30px
|
|
427
|
+
:deep(.el-input__icon) {
|
|
428
|
+
line-height: 30px;
|
|
389
429
|
}
|
|
390
430
|
}
|
|
391
431
|
|
|
392
|
-
|
|
393
|
-
min-width: 80px!important;
|
|
432
|
+
:deep(.flatmap_dropdown) {
|
|
433
|
+
min-width: 80px !important;
|
|
394
434
|
.el-select-dropdown__item {
|
|
395
435
|
white-space: nowrap;
|
|
396
436
|
text-align: left;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const EventBus = new
|
|
3
|
-
export default EventBus
|
|
1
|
+
import mitt from 'mitt'
|
|
2
|
+
const EventBus = new mitt()
|
|
3
|
+
export default EventBus
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="resource-container">
|
|
3
|
-
<template v-for="resource in resources">
|
|
4
|
-
<div class="resource"
|
|
5
|
-
<el-button
|
|
3
|
+
<template v-for="resource in resources" :key="resource.id">
|
|
4
|
+
<div class="resource">
|
|
5
|
+
<el-button
|
|
6
|
+
v-if="resource.id === 'pubmed'"
|
|
7
|
+
class="button"
|
|
8
|
+
:icon="ElIconNotebook"
|
|
9
|
+
@click="openUrl(resource.url)"
|
|
10
|
+
>
|
|
6
11
|
Open publications in pubmed
|
|
7
12
|
</el-button>
|
|
8
13
|
</div>
|
|
@@ -10,50 +15,54 @@
|
|
|
10
15
|
</div>
|
|
11
16
|
</template>
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
|
|
15
18
|
<script>
|
|
19
|
+
import { shallowRef } from 'vue'
|
|
20
|
+
import {
|
|
21
|
+
Notebook as ElIconNotebook,
|
|
22
|
+
} from '@element-plus/icons-vue'
|
|
16
23
|
/* eslint-disable no-alert, no-console */
|
|
17
|
-
import
|
|
18
|
-
import { Button } from "element-ui";
|
|
19
|
-
Vue.use(Button);
|
|
24
|
+
import { ElButton as Button } from 'element-plus'
|
|
20
25
|
|
|
21
26
|
export default {
|
|
22
|
-
name:
|
|
27
|
+
name: 'ExternalResourceCard',
|
|
28
|
+
components: {
|
|
29
|
+
Button,
|
|
30
|
+
},
|
|
23
31
|
props: {
|
|
24
32
|
resources: {
|
|
25
33
|
type: Array,
|
|
26
|
-
default: () => []
|
|
34
|
+
default: () => [],
|
|
27
35
|
},
|
|
28
36
|
},
|
|
29
|
-
data: function() {
|
|
37
|
+
data: function () {
|
|
30
38
|
return {
|
|
31
39
|
pubmeds: [],
|
|
32
40
|
pubmedIds: [],
|
|
33
|
-
|
|
41
|
+
ElIconNotebook: shallowRef(ElIconNotebook)
|
|
42
|
+
}
|
|
34
43
|
},
|
|
35
44
|
methods: {
|
|
36
|
-
capitalise: function(string) {
|
|
37
|
-
return string.charAt(0).toUpperCase() + string.slice(1)
|
|
45
|
+
capitalise: function (string) {
|
|
46
|
+
return string.charAt(0).toUpperCase() + string.slice(1)
|
|
38
47
|
},
|
|
39
|
-
openUrl: function(url){
|
|
48
|
+
openUrl: function (url) {
|
|
40
49
|
window.open(url, '_blank')
|
|
41
50
|
},
|
|
42
|
-
}
|
|
43
|
-
}
|
|
51
|
+
},
|
|
52
|
+
}
|
|
44
53
|
</script>
|
|
45
54
|
|
|
46
|
-
<style
|
|
47
|
-
@
|
|
55
|
+
<style lang="scss" scoped>
|
|
56
|
+
@use 'element-plus/theme-chalk/src/button';
|
|
48
57
|
|
|
49
|
-
.attribute-title{
|
|
58
|
+
.attribute-title {
|
|
50
59
|
font-size: 16px;
|
|
51
60
|
font-weight: 600;
|
|
52
61
|
/* font-weight: bold; */
|
|
53
62
|
text-transform: uppercase;
|
|
54
63
|
}
|
|
55
64
|
|
|
56
|
-
.attribute-content{
|
|
65
|
+
.attribute-content {
|
|
57
66
|
font-size: 14px;
|
|
58
67
|
font-weight: 400;
|
|
59
68
|
}
|
|
@@ -62,16 +71,17 @@ export default {
|
|
|
62
71
|
color: $app-primary-color;
|
|
63
72
|
text-decoration: none;
|
|
64
73
|
word-wrap: break-word;
|
|
65
|
-
&:hover,
|
|
74
|
+
&:hover,
|
|
75
|
+
&:focus {
|
|
66
76
|
color: $app-primary-color;
|
|
67
77
|
}
|
|
68
78
|
}
|
|
69
79
|
|
|
70
|
-
|
|
71
|
-
background-color: $app-primary-color;
|
|
80
|
+
:deep(.el-carousel__button) {
|
|
81
|
+
background-color: $app-primary-color;
|
|
72
82
|
}
|
|
73
83
|
|
|
74
|
-
.attribute-title{
|
|
84
|
+
.attribute-title {
|
|
75
85
|
font-size: 16px;
|
|
76
86
|
font-weight: 600;
|
|
77
87
|
/* font-weight: bold; */
|
|
@@ -84,16 +94,15 @@ export default {
|
|
|
84
94
|
font-size: 14px !important;
|
|
85
95
|
background-color: $app-primary-color;
|
|
86
96
|
color: #fff;
|
|
87
|
-
&:hover{
|
|
97
|
+
&:hover {
|
|
88
98
|
color: #fff !important;
|
|
89
99
|
background: #ac76c5 !important;
|
|
90
100
|
border: 1px solid #ac76c5 !important;
|
|
91
101
|
}
|
|
92
|
-
|
|
102
|
+
& + .button {
|
|
93
103
|
margin-top: 10px !important;
|
|
94
104
|
background-color: $app-primary-color;
|
|
95
|
-
color: #fff;
|
|
105
|
+
color: #fff;
|
|
96
106
|
}
|
|
97
107
|
}
|
|
98
|
-
|
|
99
|
-
</style>
|
|
108
|
+
</style>
|