@abi-software/flatmapvuer 0.5.8 → 0.5.9-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.
Files changed (39) hide show
  1. package/CHANGELOG.md +389 -399
  2. package/LICENSE +201 -201
  3. package/README.md +105 -105
  4. package/babel.config.js +14 -14
  5. package/dist/flatmapvuer.common.js +2656 -2330
  6. package/dist/flatmapvuer.common.js.map +1 -1
  7. package/dist/flatmapvuer.css +1 -1
  8. package/dist/flatmapvuer.umd.js +2656 -2330
  9. package/dist/flatmapvuer.umd.js.map +1 -1
  10. package/dist/flatmapvuer.umd.min.js +2 -2
  11. package/dist/flatmapvuer.umd.min.js.map +1 -1
  12. package/package-lock.json +14399 -14399
  13. package/package.json +78 -78
  14. package/public/index.html +17 -17
  15. package/src/App.vue +227 -226
  16. package/src/assets/_variables.scss +43 -43
  17. package/src/assets/styles.scss +7 -7
  18. package/src/components/AnnotationTool.vue +344 -0
  19. package/src/components/EventBus.js +2 -2
  20. package/src/components/ExternalResourceCard.vue +98 -98
  21. package/src/components/FlatmapVuer.vue +1916 -1841
  22. package/src/components/MultiFlatmapVuer.vue +531 -529
  23. package/src/components/ProvenancePopup.vue +425 -0
  24. package/src/components/SelectionsGroup.vue +249 -249
  25. package/src/components/Tooltip.vue +52 -447
  26. package/src/components/TreeControls.vue +231 -231
  27. package/src/components/index.js +9 -9
  28. package/src/components/legends/DynamicLegends.vue +112 -112
  29. package/src/components/legends/SvgLegends.vue +66 -66
  30. package/src/icons/fonts/mapicon-species.eot +0 -0
  31. package/src/icons/fonts/mapicon-species.svg +14 -14
  32. package/src/icons/fonts/mapicon-species.ttf +0 -0
  33. package/src/icons/fonts/mapicon-species.woff +0 -0
  34. package/src/icons/mapicon-species-style.css +42 -42
  35. package/src/legends/legend.svg +25 -25
  36. package/src/main.js +8 -8
  37. package/src/services/flatmapQueries.js +415 -415
  38. package/vue.config.js +31 -31
  39. package/src/nerve-map.js +0 -99
@@ -1,43 +1,43 @@
1
- // Primary colors
2
- $purple: #8300BF;
3
- $darkBlue: #24245B;
4
- $grey: #303133;
5
-
6
- // Secondary colors
7
- $lightPurple: #BC00FC;
8
- $blue: #0026FF;
9
-
10
- // Status colors
11
- $success: #5e9f69;
12
- $warning: #FF8400;
13
- $danger: #b51d09;
14
-
15
- // Text colors
16
- $neutralGrey: #616161;
17
- $mediumGrey: #606266;
18
- $lightGrey: #909399;
19
-
20
- // Line colors
21
- $lineColor1: #DCDFE6;
22
- $lineColor2: #E4E7ED;
23
-
24
- // Background colors
25
- $background: #F5F7FA;
26
- $cochlear: #FFFFFF;
27
-
28
- //Search box colors
29
- $darkGrey: #606266;
30
-
31
- $app-primary-color: $purple !default;
32
- $app-secondary-color: $darkBlue !default;
33
- $text-color: $grey !default;
34
- $input-text: $grey !default;
35
-
36
- $system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
37
- $font-family: 'Asap', sans-serif;
38
-
39
- // Viewport Sizes
40
- $viewport-sm: 20rem;
41
- $viewport-md: 47rem;
42
- $viewport-lg: 64rem;
43
- $viewport-xlg: 120rem;
1
+ // Primary colors
2
+ $purple: #8300BF;
3
+ $darkBlue: #24245B;
4
+ $grey: #303133;
5
+
6
+ // Secondary colors
7
+ $lightPurple: #BC00FC;
8
+ $blue: #0026FF;
9
+
10
+ // Status colors
11
+ $success: #5e9f69;
12
+ $warning: #FF8400;
13
+ $danger: #b51d09;
14
+
15
+ // Text colors
16
+ $neutralGrey: #616161;
17
+ $mediumGrey: #606266;
18
+ $lightGrey: #909399;
19
+
20
+ // Line colors
21
+ $lineColor1: #DCDFE6;
22
+ $lineColor2: #E4E7ED;
23
+
24
+ // Background colors
25
+ $background: #F5F7FA;
26
+ $cochlear: #FFFFFF;
27
+
28
+ //Search box colors
29
+ $darkGrey: #606266;
30
+
31
+ $app-primary-color: $purple !default;
32
+ $app-secondary-color: $darkBlue !default;
33
+ $text-color: $grey !default;
34
+ $input-text: $grey !default;
35
+
36
+ $system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
37
+ $font-family: 'Asap', sans-serif;
38
+
39
+ // Viewport Sizes
40
+ $viewport-sm: 20rem;
41
+ $viewport-md: 47rem;
42
+ $viewport-lg: 64rem;
43
+ $viewport-xlg: 120rem;
@@ -1,7 +1,7 @@
1
- @import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
2
-
3
- @import '_variables';
4
-
5
- /* icon font path, required */
6
- $--color-primary: $app-primary-color !default;
7
- $--font-path: '~element-ui/lib/theme-chalk/fonts';
1
+ @import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
2
+
3
+ @import '_variables';
4
+
5
+ /* icon font path, required */
6
+ $--color-primary: $app-primary-color !default;
7
+ $--font-path: '~element-ui/lib/theme-chalk/fonts';
@@ -0,0 +1,344 @@
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> {{ annotationEntry[key] }}
15
+ </el-row>
16
+ <template v-if="prevSubs.length > 0">
17
+ <div v-show="showSubmissions" class="hide" @click="showSubmissions = false">
18
+ Hide previous submissions
19
+ <i class="el-icon-arrow-up"></i>
20
+ </div>
21
+ <div v-show="!showSubmissions" class="hide" @click="showSubmissions = true">
22
+ Show previous submissions
23
+ <i class="el-icon-arrow-down"></i>
24
+ </div>
25
+ <template v-if="showSubmissions">
26
+ <el-row class="dialog-spacer"></el-row>
27
+ <el-row class="dialog-text">
28
+ <strong class="sub-title">Previous submissions:</strong>
29
+ </el-row>
30
+ <div class="entry" v-for="(sub, index) in prevSubs" :key="index">
31
+ <el-row class="dialog-text">
32
+ <strong>{{ sub.timestamp }}</strong> Anonoymous
33
+ </el-row>
34
+ <el-row class="dialog-text">
35
+ <strong>Evidence: </strong> {{ sub.evidence.join(', ') }}
36
+ </el-row>
37
+ <el-row class="dialog-text">
38
+ <strong>Comment: </strong> {{ sub.comment }}
39
+ </el-row>
40
+ </div>
41
+ </template>
42
+ </template>
43
+ <el-row class="dialog-spacer"></el-row>
44
+ <el-row v-if="!editing">
45
+ <i
46
+ class="el-icon-edit standard-icon"
47
+ @click="editing = true"
48
+ />
49
+ </el-row>
50
+ <template v-else>
51
+ <el-row class="dialog-text">
52
+ <strong class="sub-title">Suggest changes:</strong>
53
+ </el-row>
54
+ <el-row class="dialog-text">
55
+ <strong>Evidvence:</strong>
56
+ </el-row>
57
+ <el-row v-for="(value, index) in evidence" :key="value">
58
+ <el-col :span="20">
59
+ {{ evidence[index] }}
60
+ </el-col>
61
+ <el-col :span="4">
62
+ <i
63
+ class="el-icon-close standard-icon"
64
+ @click="removeEvidence(index)"
65
+ />
66
+ </el-col>
67
+ </el-row>
68
+ <el-row>
69
+ <el-input
70
+ size="mini"
71
+ placeholder="Enter"
72
+ v-model="newEvidence"
73
+ @change="evidenceEntered($event)"
74
+ >
75
+ <el-select
76
+ :popper-append-to-body="false"
77
+ v-model="evidencePrefix"
78
+ placeholder="Select"
79
+ class="select-box"
80
+ popper-class="flatmap_dropdown"
81
+ slot="prepend"
82
+ >
83
+ <el-option v-for="item in evidencePrefixes" :key="item" :label="item" :value="item">
84
+ <el-row>
85
+ <el-col :span="12">{{ item }}</el-col>
86
+ </el-row>
87
+ </el-option>
88
+ </el-select>
89
+ </el-input>
90
+ </el-row>
91
+ <el-row>
92
+ <strong>Comment:</strong>
93
+ </el-row>
94
+ <el-row class="dialog-text">
95
+
96
+ <el-input
97
+ type="textarea"
98
+ :autosize="{ minRows: 2, maxRows: 4}"
99
+ placeholder="Enter"
100
+ v-model="comment"
101
+ />
102
+ </el-row>
103
+ <el-row class="dialog-text">
104
+ <el-button
105
+ class="button"
106
+ type="primary"
107
+ plain
108
+ @click="submit"
109
+ >
110
+ Submit
111
+ </el-button>
112
+ </el-row>
113
+ </template>
114
+ </template>
115
+ </div>
116
+ </el-main>
117
+ </template>
118
+
119
+
120
+ <script>
121
+ /* eslint-disable no-alert, no-console */
122
+ /* eslint-disable no-alert, no-console */
123
+ import Vue from "vue";
124
+ import { Button, Col, Input, Main, Row, Select } from "element-ui";
125
+ import lang from "element-ui/lib/locale/lang/en";
126
+ import locale from "element-ui/lib/locale";
127
+ locale.use(lang);
128
+ Vue.use(Button);
129
+ Vue.use(Col);
130
+ Vue.use(Input);
131
+ Vue.use(Main);
132
+ Vue.use(Row);
133
+ Vue.use(Select);
134
+
135
+ export default {
136
+ name: "AnnotationTool",
137
+ props: {
138
+ annotationEntry: {
139
+ type: Object,
140
+ },
141
+ },
142
+ data: function() {
143
+ return {
144
+ displayPair: {
145
+ "Feature": "id",
146
+ "Tooltip": "label",
147
+ "Models": "models",
148
+ "Name": "name",
149
+ "Map layer": "layer",
150
+ },
151
+ editing: false,
152
+ evidencePrefixes: [
153
+ "DOI:",
154
+ "PMID:",
155
+ ],
156
+ evidencePrefix: "DOI:",
157
+ evidence: [ ],
158
+ newEvidence: '',
159
+ comment: '',
160
+ submissions: [ ],
161
+ showSubmissions: true
162
+ }
163
+ },
164
+ computed: {
165
+ prevSubs: function() {
166
+ return this.submissions.filter(sub => {
167
+ if (this.annotationEntry) {
168
+ if (sub.id === this.annotationEntry.id &&
169
+ sub.layer === this.annotationEntry.layer) {
170
+ return true;
171
+ }
172
+ }
173
+ return false;
174
+ });
175
+ }
176
+ },
177
+ methods: {
178
+ evidenceEntered: function(value) {
179
+ if (value) {
180
+ this.evidence.push(this.evidencePrefix + value);
181
+ this.newEvidence = "";
182
+ }
183
+ },
184
+ submit: function() {
185
+ const now = new Date();
186
+ if ((this.evidence.length > 0) || this.comment) {
187
+ this.submissions.push( {
188
+ id: this.annotationEntry['id'],
189
+ layer: this.annotationEntry['layer'],
190
+ evidence: this.evidence,
191
+ comment: this.comment,
192
+ timestamp: now.toLocaleString(),
193
+ });
194
+ this.resetSubmission();
195
+ }
196
+ },
197
+ removeEvidence: function(index) {
198
+ this.evidence.splice(index, 1);
199
+ },
200
+ resetSubmission: function() {
201
+ this.editing = false;
202
+ this.evidence = [];
203
+ this.newFeature = '';
204
+ this.comment = '';
205
+ },
206
+ },
207
+ watch: {
208
+ annotationEntry: {
209
+ handler: function() {
210
+ this.resetSubmission();
211
+ },
212
+ immediate: false,
213
+ deep: false,
214
+ }
215
+ }
216
+ };
217
+ </script>
218
+
219
+ <style scoped lang="scss">
220
+ @import "~element-ui/packages/theme-chalk/src/button";
221
+ @import "~element-ui/packages/theme-chalk/src/col";
222
+ @import "~element-ui/packages/theme-chalk/src/input";
223
+ @import "~element-ui/packages/theme-chalk/src/main";
224
+ @import "~element-ui/packages/theme-chalk/src/row";
225
+ @import "~element-ui/packages/theme-chalk/src/select";
226
+
227
+ .info-field {
228
+ display:flex;
229
+ }
230
+
231
+ .block {
232
+ margin-bottom: 0.5em;
233
+ }
234
+
235
+ .button {
236
+ padding-top:5px;
237
+ padding-bottom:5px;
238
+ }
239
+
240
+ .standard-icon {
241
+ color: $app-primary-color;
242
+ &:hover {
243
+ cursor: pointer;
244
+ }
245
+ }
246
+
247
+ .dialog-text {
248
+ color: rgb(48, 49, 51);
249
+ font-size: 14px;
250
+ font-weight: normal;
251
+ line-height: 20px;
252
+ }
253
+
254
+ .main {
255
+ font-size: 14px;
256
+ text-align: left;
257
+ line-height: 1.5em;
258
+ font-family: Asap, sans-serif,Helvetica;
259
+ font-weight: 400;
260
+ /* outline: thin red solid; */
261
+ padding: 1em !important;
262
+ overflow-x: hidden;
263
+ overflow-y: auto;
264
+ min-width: 20rem;
265
+ max-height: 400px;
266
+ scrollbar-width: thin;
267
+
268
+ &::-webkit-scrollbar {
269
+ width: 4px;
270
+ }
271
+
272
+ &::-webkit-scrollbar-thumb {
273
+ border-radius: 10px;
274
+ box-shadow: inset 0 0 6px #c0c4cc;
275
+ }
276
+ }
277
+
278
+ .title {
279
+ font-size: 18px;
280
+ font-weight: 500;
281
+ font-weight: bold;
282
+ padding-bottom: 8px;
283
+ color: rgb(131, 0, 191);
284
+ }
285
+
286
+ .sub-title {
287
+ font-size: 16px;
288
+ }
289
+
290
+
291
+ .dialog-spacer {
292
+ border-bottom: 1px solid #e4e7ed;
293
+ margin-bottom: 10px;
294
+ }
295
+
296
+ .submit {
297
+ color: $app-primary-color;
298
+ &:hover {
299
+ cursor: pointer;
300
+ }
301
+ }
302
+
303
+ .entry ~ .entry {
304
+ border-top: 1px solid #e4e7ed;
305
+ margin-top: 10px;
306
+ }
307
+
308
+ .hide{
309
+ color: $app-primary-color;
310
+ cursor: pointer;
311
+ margin-right: 6px;
312
+ margin-top: 3px;
313
+ }
314
+
315
+ ::v-deep .el-input__inner, ::v-deep .el-textarea__inner{
316
+ font-family: Asap, sans-serif;
317
+ }
318
+
319
+ .select-box {
320
+ width:80px;
321
+ background-color: var(--white);
322
+ font-weight: 500;
323
+ color:rgb(48, 49, 51);;
324
+ ::v-deep .el-input__inner {
325
+ height:30px;
326
+ color: rgb(48, 49, 51);
327
+ }
328
+ ::v-deep .el-input__icon {
329
+ line-height:30px
330
+ }
331
+ }
332
+
333
+ ::v-deep .flatmap_dropdown {
334
+ min-width: 80px!important;
335
+ .el-select-dropdown__item {
336
+ white-space: nowrap;
337
+ text-align: left;
338
+ &.selected {
339
+ color: $app-primary-color;
340
+ font-weight: normal;
341
+ }
342
+ }
343
+ }
344
+ </style>
@@ -1,3 +1,3 @@
1
- import Vue from 'vue';
2
- const EventBus = new Vue();
1
+ import Vue from 'vue';
2
+ const EventBus = new Vue();
3
3
  export default EventBus;
@@ -1,99 +1,99 @@
1
- <template>
2
- <div class="resource-container">
3
- <template v-for="resource in resources">
4
- <div class="resource" :key="resource.id">
5
- <el-button v-if="resource.id === 'pubmed'" class="button" icon="el-icon-notebook-2" @click="openUrl(resource.url)">
6
- Open publications in pubmed
7
- </el-button>
8
- </div>
9
- </template>
10
- </div>
11
- </template>
12
-
13
-
14
-
15
- <script>
16
- /* eslint-disable no-alert, no-console */
17
- import Vue from "vue";
18
- import { Button } from "element-ui";
19
- Vue.use(Button);
20
-
21
- export default {
22
- name: "ExternalResourceCard",
23
- props: {
24
- resources: {
25
- type: Array,
26
- default: () => []
27
- },
28
- },
29
- data: function() {
30
- return {
31
- pubmeds: [],
32
- pubmedIds: [],
33
- };
34
- },
35
- methods: {
36
- capitalise: function(string) {
37
- return string.charAt(0).toUpperCase() + string.slice(1);
38
- },
39
- openUrl: function(url){
40
- window.open(url, '_blank')
41
- },
42
- }
43
- };
44
- </script>
45
-
46
- <style scoped lang="scss">
47
- @import "~element-ui/packages/theme-chalk/src/button";
48
-
49
- .attribute-title{
50
- font-size: 16px;
51
- font-weight: 600;
52
- /* font-weight: bold; */
53
- text-transform: uppercase;
54
- }
55
-
56
- .attribute-content{
57
- font-size: 14px;
58
- font-weight: 400;
59
- }
60
-
61
- .el-link {
62
- color: $app-primary-color;
63
- text-decoration: none;
64
- word-wrap: break-word;
65
- &:hover, &:focus{
66
- color: $app-primary-color;
67
- }
68
- }
69
-
70
- ::v-deep .el-carousel__button {
71
- background-color: $app-primary-color;
72
- }
73
-
74
- .attribute-title{
75
- font-size: 16px;
76
- font-weight: 600;
77
- /* font-weight: bold; */
78
- text-transform: uppercase;
79
- }
80
-
81
- .button {
82
- margin-left: 0px !important;
83
- margin-top: 0px !important;
84
- font-size: 14px !important;
85
- background-color: $app-primary-color;
86
- color: #fff;
87
- &:hover{
88
- color: #fff !important;
89
- background: #ac76c5 !important;
90
- border: 1px solid #ac76c5 !important;
91
- }
92
- &+.button {
93
- margin-top: 10px !important;
94
- background-color: $app-primary-color;
95
- color: #fff;
96
- }
97
- }
98
-
1
+ <template>
2
+ <div class="resource-container">
3
+ <template v-for="resource in resources">
4
+ <div class="resource" :key="resource.id">
5
+ <el-button v-if="resource.id === 'pubmed'" class="button" icon="el-icon-notebook-2" @click="openUrl(resource.url)">
6
+ Open publications in pubmed
7
+ </el-button>
8
+ </div>
9
+ </template>
10
+ </div>
11
+ </template>
12
+
13
+
14
+
15
+ <script>
16
+ /* eslint-disable no-alert, no-console */
17
+ import Vue from "vue";
18
+ import { Button } from "element-ui";
19
+ Vue.use(Button);
20
+
21
+ export default {
22
+ name: "ExternalResourceCard",
23
+ props: {
24
+ resources: {
25
+ type: Array,
26
+ default: () => []
27
+ },
28
+ },
29
+ data: function() {
30
+ return {
31
+ pubmeds: [],
32
+ pubmedIds: [],
33
+ };
34
+ },
35
+ methods: {
36
+ capitalise: function(string) {
37
+ return string.charAt(0).toUpperCase() + string.slice(1);
38
+ },
39
+ openUrl: function(url){
40
+ window.open(url, '_blank')
41
+ },
42
+ }
43
+ };
44
+ </script>
45
+
46
+ <style scoped lang="scss">
47
+ @import "~element-ui/packages/theme-chalk/src/button";
48
+
49
+ .attribute-title{
50
+ font-size: 16px;
51
+ font-weight: 600;
52
+ /* font-weight: bold; */
53
+ text-transform: uppercase;
54
+ }
55
+
56
+ .attribute-content{
57
+ font-size: 14px;
58
+ font-weight: 400;
59
+ }
60
+
61
+ .el-link {
62
+ color: $app-primary-color;
63
+ text-decoration: none;
64
+ word-wrap: break-word;
65
+ &:hover, &:focus{
66
+ color: $app-primary-color;
67
+ }
68
+ }
69
+
70
+ ::v-deep .el-carousel__button {
71
+ background-color: $app-primary-color;
72
+ }
73
+
74
+ .attribute-title{
75
+ font-size: 16px;
76
+ font-weight: 600;
77
+ /* font-weight: bold; */
78
+ text-transform: uppercase;
79
+ }
80
+
81
+ .button {
82
+ margin-left: 0px !important;
83
+ margin-top: 0px !important;
84
+ font-size: 14px !important;
85
+ background-color: $app-primary-color;
86
+ color: #fff;
87
+ &:hover{
88
+ color: #fff !important;
89
+ background: #ac76c5 !important;
90
+ border: 1px solid #ac76c5 !important;
91
+ }
92
+ &+.button {
93
+ margin-top: 10px !important;
94
+ background-color: $app-primary-color;
95
+ color: #fff;
96
+ }
97
+ }
98
+
99
99
  </style>