@abi-software/flatmapvuer 0.3.14 → 0.3.15
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/LICENSE +201 -201
- package/README.md +105 -105
- package/babel.config.js +14 -14
- package/dist/flatmapvuer.common.js +1344 -985
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +1344 -985
- package/dist/flatmapvuer.umd.js.map +1 -1
- package/dist/flatmapvuer.umd.min.js +1 -1
- package/dist/flatmapvuer.umd.min.js.map +1 -1
- package/package-lock.json +14210 -14210
- package/package.json +71 -71
- package/public/index.html +17 -17
- package/src/App.vue +162 -162
- package/src/assets/_variables.scss +43 -43
- package/src/assets/styles.scss +7 -7
- package/src/components/EventBus.js +2 -2
- package/src/components/FlatmapVuer.vue +1634 -1636
- package/src/components/MultiFlatmapVuer.vue +509 -511
- package/src/components/PubmedViewer.vue +149 -149
- package/src/components/Tooltip.vue +594 -594
- package/src/components/index.js +9 -9
- package/src/components/legends/Legends.vue +66 -66
- package/src/icons/fonts/mapicon-species.eot +0 -0
- package/src/icons/fonts/mapicon-species.svg +14 -14
- package/src/icons/fonts/mapicon-species.ttf +0 -0
- package/src/icons/fonts/mapicon-species.woff +0 -0
- package/src/icons/mapicon-species-style.css +42 -42
- package/src/legends/legend.svg +25 -25
- package/src/main.js +8 -8
- package/vue.config.js +31 -31
- package/src/nerve-map.js +0 -99
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="pubmed-container">
|
|
3
|
-
<!-- To view old pubmed display go to: https://github.com/Tehsurfer/flatmapvuer/commit/eca131f8d32cdcac4d136d1722d7fe4df25f6c3a -->
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
/* eslint-disable no-alert, no-console */
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
name: "Tooltip",
|
|
13
|
-
props: {
|
|
14
|
-
entry: {
|
|
15
|
-
type: Object,
|
|
16
|
-
default: () => {}
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
watch: {
|
|
20
|
-
'entry.featureIds': {
|
|
21
|
-
handler: function(ids) {
|
|
22
|
-
this.pubmedQueryOnIds(ids)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
inject: ['flatmapAPI'],
|
|
27
|
-
data: function() {
|
|
28
|
-
return {
|
|
29
|
-
pubmeds: [],
|
|
30
|
-
pubmedIds: [],
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
mounted: function() {
|
|
34
|
-
if (this.entry.featureIds)
|
|
35
|
-
this.pubmedQueryOnIds(this.entry.featureIds)
|
|
36
|
-
},
|
|
37
|
-
methods: {
|
|
38
|
-
stripPMIDPrefix: function (pubmedId){
|
|
39
|
-
return pubmedId.split(':')[1]
|
|
40
|
-
},
|
|
41
|
-
buildPubmedSqlStatement: function(keastIds) {
|
|
42
|
-
let sql = 'select distinct publication from publications where entity in ('
|
|
43
|
-
if (keastIds.length === 1) {
|
|
44
|
-
sql += `'${keastIds[0]}')`
|
|
45
|
-
} else if (keastIds.length > 1) {
|
|
46
|
-
for (let i in keastIds) {
|
|
47
|
-
sql += `'${keastIds[i]}'${i >= keastIds.length - 1 ? ')' : ','} `
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return sql
|
|
51
|
-
},
|
|
52
|
-
buildPubmedSqlStatementForModels: function(model) {
|
|
53
|
-
return `select distinct publication from publications where entity = '${model}'`
|
|
54
|
-
},
|
|
55
|
-
flatmapQuery: function(sql){
|
|
56
|
-
const data = { sql: sql}
|
|
57
|
-
return fetch(`${this.flatmapAPI}knowledge/query/`, {
|
|
58
|
-
method: 'POST',
|
|
59
|
-
headers: {
|
|
60
|
-
'Content-Type': 'application/json',
|
|
61
|
-
},
|
|
62
|
-
body: JSON.stringify(data),
|
|
63
|
-
})
|
|
64
|
-
.then(response => response.json())
|
|
65
|
-
.catch((error) => {
|
|
66
|
-
console.error('Error:', error)
|
|
67
|
-
})
|
|
68
|
-
},
|
|
69
|
-
pubmedQueryOnIds: function(keastIds){
|
|
70
|
-
if(!keastIds || keastIds.length === 0) return
|
|
71
|
-
const sql = this.buildPubmedSqlStatement(keastIds)
|
|
72
|
-
this.flatmapQuery(sql).then(data=>{
|
|
73
|
-
this.responseData = data
|
|
74
|
-
// Create pubmed url on paths if we have them
|
|
75
|
-
if (data.values.length > 0){
|
|
76
|
-
this.$emit('pubmedSearchUrl', this.pubmedSearchUrl(data.values.map(id=>this.stripPMIDPrefix(id[0]))))
|
|
77
|
-
} else { // Create pubmed url on models
|
|
78
|
-
this.pubmedQueryOnModels(this.entry.source)
|
|
79
|
-
}
|
|
80
|
-
})
|
|
81
|
-
},
|
|
82
|
-
pubmedQueryOnModels(source){
|
|
83
|
-
this.flatmapQuery(this.buildPubmedSqlStatementForModels(source)).then(data=>{
|
|
84
|
-
if (Array.isArray(data.values) && data.values.length > 0){
|
|
85
|
-
this.$emit('pubmedSearchUrl', this.pubmedSearchUrl(data.values.map(id=>this.stripPMIDPrefix(id[0]))))
|
|
86
|
-
} else {
|
|
87
|
-
this.$emit('pubmedSearchUrl', '') // Clears the pubmed search button
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
},
|
|
91
|
-
pubmedSearchUrl: function(ids) {
|
|
92
|
-
let url = 'https://pubmed.ncbi.nlm.nih.gov/?'
|
|
93
|
-
let params = new URLSearchParams()
|
|
94
|
-
params.append('term', ids)
|
|
95
|
-
return url + params.toString()
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
</script>
|
|
100
|
-
|
|
101
|
-
<style scoped lang="scss">
|
|
102
|
-
@import "~element-ui/packages/theme-chalk/src/link";
|
|
103
|
-
@import "~element-ui/packages/theme-chalk/src/carousel";
|
|
104
|
-
@import "~element-ui/packages/theme-chalk/src/carousel-item";
|
|
105
|
-
|
|
106
|
-
.attribute-title{
|
|
107
|
-
font-size: 16px;
|
|
108
|
-
font-weight: 600;
|
|
109
|
-
/* font-weight: bold; */
|
|
110
|
-
text-transform: uppercase;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.attribute-content{
|
|
114
|
-
font-size: 14px;
|
|
115
|
-
font-weight: 400;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.el-link {
|
|
119
|
-
color: $app-primary-color;
|
|
120
|
-
text-decoration: none;
|
|
121
|
-
word-wrap: break-word;
|
|
122
|
-
&:hover, &:focus{
|
|
123
|
-
color: $app-primary-color;
|
|
124
|
-
text-decoration: underline;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
::v-deep .el-carousel__button {
|
|
129
|
-
background-color: $app-primary-color;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.button {
|
|
133
|
-
margin-left: 0px !important;
|
|
134
|
-
margin-top: 0px !important;
|
|
135
|
-
font-size: 14px !important;
|
|
136
|
-
background-color: $app-primary-color;
|
|
137
|
-
color: #fff;
|
|
138
|
-
&:hover{
|
|
139
|
-
color: #fff !important;
|
|
140
|
-
background: #ac76c5 !important;
|
|
141
|
-
border: 1px solid #ac76c5 !important;
|
|
142
|
-
}
|
|
143
|
-
&+.button {
|
|
144
|
-
margin-top: 10px !important;
|
|
145
|
-
background-color: $app-primary-color;
|
|
146
|
-
color: #fff;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pubmed-container">
|
|
3
|
+
<!-- To view old pubmed display go to: https://github.com/Tehsurfer/flatmapvuer/commit/eca131f8d32cdcac4d136d1722d7fe4df25f6c3a -->
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
/* eslint-disable no-alert, no-console */
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: "Tooltip",
|
|
13
|
+
props: {
|
|
14
|
+
entry: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: () => {}
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
watch: {
|
|
20
|
+
'entry.featureIds': {
|
|
21
|
+
handler: function(ids) {
|
|
22
|
+
this.pubmedQueryOnIds(ids)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
inject: ['flatmapAPI'],
|
|
27
|
+
data: function() {
|
|
28
|
+
return {
|
|
29
|
+
pubmeds: [],
|
|
30
|
+
pubmedIds: [],
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
mounted: function() {
|
|
34
|
+
if (this.entry.featureIds)
|
|
35
|
+
this.pubmedQueryOnIds(this.entry.featureIds)
|
|
36
|
+
},
|
|
37
|
+
methods: {
|
|
38
|
+
stripPMIDPrefix: function (pubmedId){
|
|
39
|
+
return pubmedId.split(':')[1]
|
|
40
|
+
},
|
|
41
|
+
buildPubmedSqlStatement: function(keastIds) {
|
|
42
|
+
let sql = 'select distinct publication from publications where entity in ('
|
|
43
|
+
if (keastIds.length === 1) {
|
|
44
|
+
sql += `'${keastIds[0]}')`
|
|
45
|
+
} else if (keastIds.length > 1) {
|
|
46
|
+
for (let i in keastIds) {
|
|
47
|
+
sql += `'${keastIds[i]}'${i >= keastIds.length - 1 ? ')' : ','} `
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return sql
|
|
51
|
+
},
|
|
52
|
+
buildPubmedSqlStatementForModels: function(model) {
|
|
53
|
+
return `select distinct publication from publications where entity = '${model}'`
|
|
54
|
+
},
|
|
55
|
+
flatmapQuery: function(sql){
|
|
56
|
+
const data = { sql: sql}
|
|
57
|
+
return fetch(`${this.flatmapAPI}knowledge/query/`, {
|
|
58
|
+
method: 'POST',
|
|
59
|
+
headers: {
|
|
60
|
+
'Content-Type': 'application/json',
|
|
61
|
+
},
|
|
62
|
+
body: JSON.stringify(data),
|
|
63
|
+
})
|
|
64
|
+
.then(response => response.json())
|
|
65
|
+
.catch((error) => {
|
|
66
|
+
console.error('Error:', error)
|
|
67
|
+
})
|
|
68
|
+
},
|
|
69
|
+
pubmedQueryOnIds: function(keastIds){
|
|
70
|
+
if(!keastIds || keastIds.length === 0) return
|
|
71
|
+
const sql = this.buildPubmedSqlStatement(keastIds)
|
|
72
|
+
this.flatmapQuery(sql).then(data=>{
|
|
73
|
+
this.responseData = data
|
|
74
|
+
// Create pubmed url on paths if we have them
|
|
75
|
+
if (data.values.length > 0){
|
|
76
|
+
this.$emit('pubmedSearchUrl', this.pubmedSearchUrl(data.values.map(id=>this.stripPMIDPrefix(id[0]))))
|
|
77
|
+
} else { // Create pubmed url on models
|
|
78
|
+
this.pubmedQueryOnModels(this.entry.source)
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
},
|
|
82
|
+
pubmedQueryOnModels(source){
|
|
83
|
+
this.flatmapQuery(this.buildPubmedSqlStatementForModels(source)).then(data=>{
|
|
84
|
+
if (Array.isArray(data.values) && data.values.length > 0){
|
|
85
|
+
this.$emit('pubmedSearchUrl', this.pubmedSearchUrl(data.values.map(id=>this.stripPMIDPrefix(id[0]))))
|
|
86
|
+
} else {
|
|
87
|
+
this.$emit('pubmedSearchUrl', '') // Clears the pubmed search button
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
},
|
|
91
|
+
pubmedSearchUrl: function(ids) {
|
|
92
|
+
let url = 'https://pubmed.ncbi.nlm.nih.gov/?'
|
|
93
|
+
let params = new URLSearchParams()
|
|
94
|
+
params.append('term', ids)
|
|
95
|
+
return url + params.toString()
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<style scoped lang="scss">
|
|
102
|
+
@import "~element-ui/packages/theme-chalk/src/link";
|
|
103
|
+
@import "~element-ui/packages/theme-chalk/src/carousel";
|
|
104
|
+
@import "~element-ui/packages/theme-chalk/src/carousel-item";
|
|
105
|
+
|
|
106
|
+
.attribute-title{
|
|
107
|
+
font-size: 16px;
|
|
108
|
+
font-weight: 600;
|
|
109
|
+
/* font-weight: bold; */
|
|
110
|
+
text-transform: uppercase;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.attribute-content{
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
font-weight: 400;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.el-link {
|
|
119
|
+
color: $app-primary-color;
|
|
120
|
+
text-decoration: none;
|
|
121
|
+
word-wrap: break-word;
|
|
122
|
+
&:hover, &:focus{
|
|
123
|
+
color: $app-primary-color;
|
|
124
|
+
text-decoration: underline;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
::v-deep .el-carousel__button {
|
|
129
|
+
background-color: $app-primary-color;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.button {
|
|
133
|
+
margin-left: 0px !important;
|
|
134
|
+
margin-top: 0px !important;
|
|
135
|
+
font-size: 14px !important;
|
|
136
|
+
background-color: $app-primary-color;
|
|
137
|
+
color: #fff;
|
|
138
|
+
&:hover{
|
|
139
|
+
color: #fff !important;
|
|
140
|
+
background: #ac76c5 !important;
|
|
141
|
+
border: 1px solid #ac76c5 !important;
|
|
142
|
+
}
|
|
143
|
+
&+.button {
|
|
144
|
+
margin-top: 10px !important;
|
|
145
|
+
background-color: $app-primary-color;
|
|
146
|
+
color: #fff;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
150
|
</style>
|