@abi-software/flatmapvuer 0.6.0-vue3.8 → 0.6.1-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.
Files changed (35) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +107 -107
  3. package/dist/flatmapvuer.js +17 -17
  4. package/dist/flatmapvuer.umd.cjs +2 -2
  5. package/dist/index.html +17 -17
  6. package/dist/style.css +1 -1
  7. package/package.json +84 -84
  8. package/public/index.html +17 -17
  9. package/src/App.vue +319 -318
  10. package/src/assets/_variables.scss +43 -43
  11. package/src/assets/styles.scss +5 -5
  12. package/src/components/AnnotationTool.vue +437 -437
  13. package/src/components/EventBus.js +3 -3
  14. package/src/components/ExternalResourceCard.vue +106 -106
  15. package/src/components/FlatmapVuer.vue +2129 -2129
  16. package/src/components/MultiFlatmapVuer.vue +613 -613
  17. package/src/components/ProvenancePopup.vue +490 -490
  18. package/src/components/SelectionsGroup.vue +255 -255
  19. package/src/components/Tooltip.vue +50 -50
  20. package/src/components/TreeControls.vue +231 -231
  21. package/src/components/index.js +7 -7
  22. package/src/components/legends/DynamicLegends.vue +106 -106
  23. package/src/components/legends/SvgLegends.vue +112 -112
  24. package/src/icons/flatmap-marker.js +1 -1
  25. package/src/icons/fonts/mapicon-species.svg +14 -14
  26. package/src/icons/fonts/mapicon-species.ttf +0 -0
  27. package/src/icons/fonts/mapicon-species.woff +0 -0
  28. package/src/icons/mapicon-species-style.css +42 -42
  29. package/src/icons/yellowstar.js +5 -5
  30. package/src/legends/legend.svg +25 -25
  31. package/src/main.js +4 -4
  32. package/src/nerve-map.js +99 -0
  33. package/src/services/flatmapQueries.js +451 -451
  34. package/vite.config.js +66 -66
  35. package/vite.static-build.js +12 -12
@@ -1,437 +1,437 @@
1
- <template>
2
- <el-main class="main">
3
- <div class="block">
4
- <el-row class="info-field">
5
- <span class="title">Feature Annotations</span>
6
- </el-row>
7
- <template v-if="annotationEntry">
8
- <el-row
9
- v-for="(key, label) in displayPair"
10
- v-show="annotationEntry[key]"
11
- class="dialog-text"
12
- :key="key"
13
- >
14
- <strong>{{ label }}: </strong>&nbsp;{{ annotationEntry[key] }}
15
- </el-row>
16
- <template v-if="prevSubs.length > 0">
17
- <div
18
- v-show="showSubmissions"
19
- class="hide"
20
- @click="showSubmissions = false"
21
- >
22
- Hide previous submissions
23
- <el-icon><el-icon-arrow-up /></el-icon>
24
- </div>
25
- <div
26
- v-show="!showSubmissions"
27
- class="hide"
28
- @click="showSubmissions = true"
29
- >
30
- Show previous {{ prevSubs.length }} submission(s)
31
- <el-icon><el-icon-arrow-down /></el-icon>
32
- </div>
33
- <template v-if="showSubmissions">
34
- <el-row class="dialog-spacer"></el-row>
35
- <el-row class="dialog-text">
36
- <strong class="sub-title">Previous submissions:</strong>
37
- </el-row>
38
- <div class="entry" v-for="(sub, index) in prevSubs" :key="index">
39
- <el-row class="dialog-text">
40
- <strong>{{ formatTime(sub.created) }}</strong>
41
- {{ sub.creator.name }}
42
- </el-row>
43
- <el-row class="dialog-text">
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>
51
- </el-row>
52
- </el-row>
53
- <el-row class="dialog-text">
54
- <strong>Comment: </strong> {{ sub.comment }}
55
- </el-row>
56
- </div>
57
- </template>
58
- </template>
59
- <template v-if="authenticated">
60
- <template v-if="isEditable">
61
- <el-row class="dialog-spacer"></el-row>
62
- <el-row v-if="!editing">
63
- <el-icon class="standard-icon"><el-icon-edit /></el-icon>
64
- </el-row>
65
- <template v-else>
66
- <el-row class="dialog-text">
67
- <strong class="sub-title">Suggest changes:</strong>
68
- </el-row>
69
- <el-row class="dialog-text">
70
- <strong>Evidvence:</strong>
71
- </el-row>
72
- <el-row v-for="(value, index) in evidence" :key="value">
73
- <el-col :span="20">
74
- {{ evidence[index] }}
75
- </el-col>
76
- <el-col :span="4">
77
- <el-icon class="standard-icon"><el-icon-close /></el-icon>
78
- </el-col>
79
- </el-row>
80
- <el-row>
81
- <el-input
82
- size="mini"
83
- placeholder="Enter"
84
- v-model="newEvidence"
85
- @change="evidenceEntered($event)"
86
- >
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>
107
- </el-input>
108
- </el-row>
109
- <el-row>
110
- <strong>Comment:</strong>
111
- </el-row>
112
- <el-row class="dialog-text">
113
- <el-input
114
- type="textarea"
115
- :autosize="{ minRows: 2, maxRows: 4 }"
116
- placeholder="Enter"
117
- v-model="comment"
118
- />
119
- </el-row>
120
- <el-row class="dialog-text">
121
- <el-button class="button" type="primary" plain @click="submit">
122
- Submit
123
- </el-button>
124
- </el-row>
125
- </template>
126
- <el-row class="dialog-text" v-if="errorMessage">
127
- <strong class="sub-title"> {{ errorMessage }} </strong>
128
- </el-row>
129
- </template>
130
- </template>
131
- </template>
132
- </div>
133
- </el-main>
134
- </template>
135
-
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'
143
- /* eslint-disable no-alert, no-console */
144
- /* eslint-disable no-alert, no-console */
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'
154
-
155
- export default {
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
- },
169
- props: {
170
- annotationEntry: {
171
- type: Object,
172
- },
173
- },
174
- inject: ['flatmapAPI'],
175
- data: function () {
176
- return {
177
- displayPair: {
178
- 'Feature ID': 'featureId',
179
- Tooltip: 'label',
180
- Models: 'models',
181
- Name: 'name',
182
- Resource: 'resourceId',
183
- },
184
- editing: false,
185
- evidencePrefixes: ['DOI:', 'PMID:'],
186
- evidencePrefix: 'DOI:',
187
- evidence: [],
188
- authenticated: false,
189
- newEvidence: '',
190
- comment: '',
191
- prevSubs: [],
192
- showSubmissions: true,
193
- errorMessage: '',
194
- }
195
- },
196
- computed: {
197
- isEditable: function () {
198
- return (
199
- this.annotationEntry['resourceId'] && this.annotationEntry['featureId']
200
- )
201
- },
202
- },
203
- methods: {
204
- evidenceEntered: function (value) {
205
- if (value) {
206
- this.evidence.push(this.evidencePrefix + value)
207
- this.newEvidence = ''
208
- }
209
- },
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)
220
- },
221
- updatePrevSubmissions: function () {
222
- if (this.$annotator && this.authenticated) {
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
- })
238
- }
239
- }
240
- },
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 = []
248
- this.evidence.forEach((evidence) => {
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))
258
- }
259
- })
260
- const userAnnotation = {
261
- resource: this.annotationEntry['resourceId'],
262
- item: this.annotationEntry['featureId'],
263
- evidence: evidenceURLs,
264
- comment: this.comment,
265
- }
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
- })
277
- }
278
- }
279
- },
280
- removeEvidence: function (index) {
281
- this.evidence.splice(index, 1)
282
- },
283
- resetSubmission: function () {
284
- this.editing = false
285
- this.evidence = []
286
- this.newFeature = ''
287
- this.comment = ''
288
- },
289
- },
290
- watch: {
291
- annotationEntry: {
292
- handler: function () {
293
- this.resetSubmission()
294
- this.updatePrevSubmissions()
295
- },
296
- immediate: false,
297
- deep: false,
298
- },
299
- },
300
- mounted: function () {
301
- if (!this.$annotator) {
302
- this.$annotator = new AnnotationService(
303
- `${this.flatmapAPI}annotator`
304
- )
305
- }
306
- this.$annotator.authenticate().then((userData) => {
307
- if (userData.name && userData.email) {
308
- this.authenticated = true
309
- this.updatePrevSubmissions()
310
- } else {
311
- this.errorMessage = ''
312
- }
313
- })
314
- },
315
- }
316
- </script>
317
-
318
- <style lang="scss" scoped>
319
-
320
- .info-field {
321
- display: flex;
322
- }
323
-
324
- .block {
325
- margin-bottom: 0.5em;
326
- }
327
-
328
- .button {
329
- padding-top: 5px;
330
- padding-bottom: 5px;
331
- }
332
-
333
- .standard-icon {
334
- color: $app-primary-color;
335
- &:hover {
336
- cursor: pointer;
337
- }
338
- }
339
-
340
- .dialog-text {
341
- color: rgb(48, 49, 51);
342
- font-size: 14px;
343
- font-weight: normal;
344
- line-height: 20px;
345
- }
346
-
347
- .main {
348
- font-size: 14px;
349
- text-align: left;
350
- line-height: 1.5em;
351
- font-family: Asap, sans-serif, Helvetica;
352
- font-weight: 400;
353
- /* outline: thin red solid; */
354
- padding: 1em !important;
355
- overflow-x: hidden;
356
- overflow-y: auto;
357
- min-width: 20rem;
358
- max-height: 400px;
359
- scrollbar-width: thin;
360
-
361
- &::-webkit-scrollbar {
362
- width: 4px;
363
- }
364
-
365
- &::-webkit-scrollbar-thumb {
366
- border-radius: 10px;
367
- box-shadow: inset 0 0 6px #c0c4cc;
368
- }
369
- }
370
-
371
- .title {
372
- font-size: 18px;
373
- font-weight: 500;
374
- font-weight: bold;
375
- padding-bottom: 8px;
376
- color: rgb(131, 0, 191);
377
- }
378
-
379
- .sub-title {
380
- font-size: 16px;
381
- }
382
-
383
- .dialog-spacer {
384
- border-bottom: 1px solid #e4e7ed;
385
- margin-bottom: 10px;
386
- }
387
-
388
- .submit {
389
- color: $app-primary-color;
390
- &:hover {
391
- cursor: pointer;
392
- }
393
- }
394
-
395
- .entry ~ .entry {
396
- border-top: 1px solid #e4e7ed;
397
- margin-top: 10px;
398
- }
399
-
400
- .hide {
401
- color: $app-primary-color;
402
- cursor: pointer;
403
- margin-right: 6px;
404
- margin-top: 3px;
405
- }
406
-
407
- :deep(.el-input__inner),
408
- :deep(.el-textarea__inner) {
409
- font-family: Asap, sans-serif;
410
- }
411
-
412
- .select-box {
413
- width: 80px;
414
- background-color: var(--white);
415
- font-weight: 500;
416
- color: rgb(48, 49, 51);
417
- :deep(.el-input__inner) {
418
- height: 30px;
419
- color: rgb(48, 49, 51);
420
- }
421
- :deep(.el-input__icon) {
422
- line-height: 30px;
423
- }
424
- }
425
-
426
- :deep(.flatmap_dropdown) {
427
- min-width: 80px !important;
428
- .el-select-dropdown__item {
429
- white-space: nowrap;
430
- text-align: left;
431
- &.selected {
432
- color: $app-primary-color;
433
- font-weight: normal;
434
- }
435
- }
436
- }
437
- </style>
1
+ <template>
2
+ <el-main class="main">
3
+ <div class="block">
4
+ <el-row class="info-field">
5
+ <span class="title">Feature Annotations</span>
6
+ </el-row>
7
+ <template v-if="annotationEntry">
8
+ <el-row
9
+ v-for="(key, label) in displayPair"
10
+ v-show="annotationEntry[key]"
11
+ class="dialog-text"
12
+ :key="key"
13
+ >
14
+ <strong>{{ label }}: </strong>&nbsp;{{ annotationEntry[key] }}
15
+ </el-row>
16
+ <template v-if="prevSubs.length > 0">
17
+ <div
18
+ v-show="showSubmissions"
19
+ class="hide"
20
+ @click="showSubmissions = false"
21
+ >
22
+ Hide previous submissions
23
+ <el-icon><el-icon-arrow-up /></el-icon>
24
+ </div>
25
+ <div
26
+ v-show="!showSubmissions"
27
+ class="hide"
28
+ @click="showSubmissions = true"
29
+ >
30
+ Show previous {{ prevSubs.length }} submission(s)
31
+ <el-icon><el-icon-arrow-down /></el-icon>
32
+ </div>
33
+ <template v-if="showSubmissions">
34
+ <el-row class="dialog-spacer"></el-row>
35
+ <el-row class="dialog-text">
36
+ <strong class="sub-title">Previous submissions:</strong>
37
+ </el-row>
38
+ <div class="entry" v-for="(sub, index) in prevSubs" :key="index">
39
+ <el-row class="dialog-text">
40
+ <strong>{{ formatTime(sub.created) }}</strong>
41
+ {{ sub.creator.name }}
42
+ </el-row>
43
+ <el-row class="dialog-text">
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>
51
+ </el-row>
52
+ </el-row>
53
+ <el-row class="dialog-text">
54
+ <strong>Comment: </strong> {{ sub.comment }}
55
+ </el-row>
56
+ </div>
57
+ </template>
58
+ </template>
59
+ <template v-if="authenticated">
60
+ <template v-if="isEditable">
61
+ <el-row class="dialog-spacer"></el-row>
62
+ <el-row v-if="!editing">
63
+ <el-icon class="standard-icon"><el-icon-edit /></el-icon>
64
+ </el-row>
65
+ <template v-else>
66
+ <el-row class="dialog-text">
67
+ <strong class="sub-title">Suggest changes:</strong>
68
+ </el-row>
69
+ <el-row class="dialog-text">
70
+ <strong>Evidvence:</strong>
71
+ </el-row>
72
+ <el-row v-for="(value, index) in evidence" :key="value">
73
+ <el-col :span="20">
74
+ {{ evidence[index] }}
75
+ </el-col>
76
+ <el-col :span="4">
77
+ <el-icon class="standard-icon"><el-icon-close /></el-icon>
78
+ </el-col>
79
+ </el-row>
80
+ <el-row>
81
+ <el-input
82
+ size="mini"
83
+ placeholder="Enter"
84
+ v-model="newEvidence"
85
+ @change="evidenceEntered($event)"
86
+ >
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>
107
+ </el-input>
108
+ </el-row>
109
+ <el-row>
110
+ <strong>Comment:</strong>
111
+ </el-row>
112
+ <el-row class="dialog-text">
113
+ <el-input
114
+ type="textarea"
115
+ :autosize="{ minRows: 2, maxRows: 4 }"
116
+ placeholder="Enter"
117
+ v-model="comment"
118
+ />
119
+ </el-row>
120
+ <el-row class="dialog-text">
121
+ <el-button class="button" type="primary" plain @click="submit">
122
+ Submit
123
+ </el-button>
124
+ </el-row>
125
+ </template>
126
+ <el-row class="dialog-text" v-if="errorMessage">
127
+ <strong class="sub-title"> {{ errorMessage }} </strong>
128
+ </el-row>
129
+ </template>
130
+ </template>
131
+ </template>
132
+ </div>
133
+ </el-main>
134
+ </template>
135
+
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'
143
+ /* eslint-disable no-alert, no-console */
144
+ /* eslint-disable no-alert, no-console */
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'
154
+
155
+ export default {
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
+ },
169
+ props: {
170
+ annotationEntry: {
171
+ type: Object,
172
+ },
173
+ },
174
+ inject: ['flatmapAPI'],
175
+ data: function () {
176
+ return {
177
+ displayPair: {
178
+ 'Feature ID': 'featureId',
179
+ Tooltip: 'label',
180
+ Models: 'models',
181
+ Name: 'name',
182
+ Resource: 'resourceId',
183
+ },
184
+ editing: false,
185
+ evidencePrefixes: ['DOI:', 'PMID:'],
186
+ evidencePrefix: 'DOI:',
187
+ evidence: [],
188
+ authenticated: false,
189
+ newEvidence: '',
190
+ comment: '',
191
+ prevSubs: [],
192
+ showSubmissions: true,
193
+ errorMessage: '',
194
+ }
195
+ },
196
+ computed: {
197
+ isEditable: function () {
198
+ return (
199
+ this.annotationEntry['resourceId'] && this.annotationEntry['featureId']
200
+ )
201
+ },
202
+ },
203
+ methods: {
204
+ evidenceEntered: function (value) {
205
+ if (value) {
206
+ this.evidence.push(this.evidencePrefix + value)
207
+ this.newEvidence = ''
208
+ }
209
+ },
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)
220
+ },
221
+ updatePrevSubmissions: function () {
222
+ if (this.$annotator && this.authenticated) {
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
+ })
238
+ }
239
+ }
240
+ },
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 = []
248
+ this.evidence.forEach((evidence) => {
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))
258
+ }
259
+ })
260
+ const userAnnotation = {
261
+ resource: this.annotationEntry['resourceId'],
262
+ item: this.annotationEntry['featureId'],
263
+ evidence: evidenceURLs,
264
+ comment: this.comment,
265
+ }
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
+ })
277
+ }
278
+ }
279
+ },
280
+ removeEvidence: function (index) {
281
+ this.evidence.splice(index, 1)
282
+ },
283
+ resetSubmission: function () {
284
+ this.editing = false
285
+ this.evidence = []
286
+ this.newFeature = ''
287
+ this.comment = ''
288
+ },
289
+ },
290
+ watch: {
291
+ annotationEntry: {
292
+ handler: function () {
293
+ this.resetSubmission()
294
+ this.updatePrevSubmissions()
295
+ },
296
+ immediate: false,
297
+ deep: false,
298
+ },
299
+ },
300
+ mounted: function () {
301
+ if (!this.$annotator) {
302
+ this.$annotator = new AnnotationService(
303
+ `${this.flatmapAPI}annotator`
304
+ )
305
+ }
306
+ this.$annotator.authenticate().then((userData) => {
307
+ if (userData.name && userData.email) {
308
+ this.authenticated = true
309
+ this.updatePrevSubmissions()
310
+ } else {
311
+ this.errorMessage = ''
312
+ }
313
+ })
314
+ },
315
+ }
316
+ </script>
317
+
318
+ <style lang="scss" scoped>
319
+
320
+ .info-field {
321
+ display: flex;
322
+ }
323
+
324
+ .block {
325
+ margin-bottom: 0.5em;
326
+ }
327
+
328
+ .button {
329
+ padding-top: 5px;
330
+ padding-bottom: 5px;
331
+ }
332
+
333
+ .standard-icon {
334
+ color: $app-primary-color;
335
+ &:hover {
336
+ cursor: pointer;
337
+ }
338
+ }
339
+
340
+ .dialog-text {
341
+ color: rgb(48, 49, 51);
342
+ font-size: 14px;
343
+ font-weight: normal;
344
+ line-height: 20px;
345
+ }
346
+
347
+ .main {
348
+ font-size: 14px;
349
+ text-align: left;
350
+ line-height: 1.5em;
351
+ font-family: Asap, sans-serif, Helvetica;
352
+ font-weight: 400;
353
+ /* outline: thin red solid; */
354
+ padding: 1em !important;
355
+ overflow-x: hidden;
356
+ overflow-y: auto;
357
+ min-width: 20rem;
358
+ max-height: 400px;
359
+ scrollbar-width: thin;
360
+
361
+ &::-webkit-scrollbar {
362
+ width: 4px;
363
+ }
364
+
365
+ &::-webkit-scrollbar-thumb {
366
+ border-radius: 10px;
367
+ box-shadow: inset 0 0 6px #c0c4cc;
368
+ }
369
+ }
370
+
371
+ .title {
372
+ font-size: 18px;
373
+ font-weight: 500;
374
+ font-weight: bold;
375
+ padding-bottom: 8px;
376
+ color: rgb(131, 0, 191);
377
+ }
378
+
379
+ .sub-title {
380
+ font-size: 16px;
381
+ }
382
+
383
+ .dialog-spacer {
384
+ border-bottom: 1px solid #e4e7ed;
385
+ margin-bottom: 10px;
386
+ }
387
+
388
+ .submit {
389
+ color: $app-primary-color;
390
+ &:hover {
391
+ cursor: pointer;
392
+ }
393
+ }
394
+
395
+ .entry ~ .entry {
396
+ border-top: 1px solid #e4e7ed;
397
+ margin-top: 10px;
398
+ }
399
+
400
+ .hide {
401
+ color: $app-primary-color;
402
+ cursor: pointer;
403
+ margin-right: 6px;
404
+ margin-top: 3px;
405
+ }
406
+
407
+ :deep(.el-input__inner),
408
+ :deep(.el-textarea__inner) {
409
+ font-family: Asap, sans-serif;
410
+ }
411
+
412
+ .select-box {
413
+ width: 80px;
414
+ background-color: var(--white);
415
+ font-weight: 500;
416
+ color: rgb(48, 49, 51);
417
+ :deep(.el-input__inner) {
418
+ height: 30px;
419
+ color: rgb(48, 49, 51);
420
+ }
421
+ :deep(.el-input__icon) {
422
+ line-height: 30px;
423
+ }
424
+ }
425
+
426
+ :deep(.flatmap_dropdown) {
427
+ min-width: 80px !important;
428
+ .el-select-dropdown__item {
429
+ white-space: nowrap;
430
+ text-align: left;
431
+ &.selected {
432
+ color: $app-primary-color;
433
+ font-weight: normal;
434
+ }
435
+ }
436
+ }
437
+ </style>