@abi-software/map-side-bar 1.3.0 → 1.3.3

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
@@ -1,65 +1,65 @@
1
- {
2
- "name": "@abi-software/map-side-bar",
3
- "version": "1.3.0",
4
- "main": "./dist/map-side-bar.common.js",
5
- "files": [
6
- "dist/*",
7
- "src/*",
8
- "public/*",
9
- "*.json",
10
- "*.js"
11
- ],
12
- "scripts": {
13
- "serve": "vue-cli-service serve --port 8081",
14
- "build-bundle": "vue-cli-service build --target lib --name map-side-bar ./src/components/index.js ",
15
- "build": "vue-cli-service build",
16
- "lint": "vue-cli-service lint",
17
- "start": "vue-cli-service serve"
18
- },
19
- "dependencies": {
20
- "@abi-software/gallery": "^0.3.0",
21
- "@abi-software/svg-sprite": "^0.1.14",
22
- "algoliasearch": "^4.10.5",
23
- "element-ui": "^2.13.0",
24
- "vue": "^2.6.10"
25
- },
26
- "devDependencies": {
27
- "@vue/cli-plugin-babel": "^4.0.0",
28
- "@vue/cli-plugin-eslint": "^4.0.0",
29
- "@vue/cli-service": "^4.0.0",
30
- "babel-eslint": "^10.0.3",
31
- "babel-plugin-component": "^1.1.1",
32
- "eslint": "^5.16.0",
33
- "eslint-plugin-vue": "^5.0.0",
34
- "file-loader": "^5.0.2",
35
- "raw-loader": "^0.5.1",
36
- "transform-loader": "^0.2.4",
37
- "typescript": "^4.4.3",
38
- "vue-custom-element": "^3.3.0",
39
- "vue-template-compiler": "^2.6.10",
40
- "webpack-node-externals": "^2.5.2"
41
- },
42
- "eslintConfig": {
43
- "root": true,
44
- "env": {
45
- "node": true
46
- },
47
- "extends": [
48
- "plugin:vue/essential",
49
- "eslint:recommended"
50
- ],
51
- "rules": {},
52
- "parserOptions": {
53
- "parser": "babel-eslint"
54
- }
55
- },
56
- "postcss": {
57
- "plugins": {
58
- "autoprefixer": {}
59
- }
60
- },
61
- "browserslist": [
62
- "> 1%",
63
- "last 2 versions"
64
- ]
65
- }
1
+ {
2
+ "name": "@abi-software/map-side-bar",
3
+ "version": "1.3.3",
4
+ "main": "./dist/map-side-bar.common.js",
5
+ "files": [
6
+ "dist/*",
7
+ "src/*",
8
+ "public/*",
9
+ "*.json",
10
+ "*.js"
11
+ ],
12
+ "scripts": {
13
+ "serve": "vue-cli-service serve --port 8081",
14
+ "build-bundle": "vue-cli-service build --target lib --name map-side-bar ./src/components/index.js ",
15
+ "build": "vue-cli-service build",
16
+ "lint": "vue-cli-service lint",
17
+ "start": "vue-cli-service serve"
18
+ },
19
+ "dependencies": {
20
+ "@abi-software/gallery": "^0.3.1",
21
+ "@abi-software/svg-sprite": "^0.1.14",
22
+ "algoliasearch": "^4.10.5",
23
+ "element-ui": "^2.13.0",
24
+ "vue": "^2.6.10"
25
+ },
26
+ "devDependencies": {
27
+ "@vue/cli-plugin-babel": "^4.0.0",
28
+ "@vue/cli-plugin-eslint": "^4.0.0",
29
+ "@vue/cli-service": "^4.0.0",
30
+ "babel-eslint": "^10.0.3",
31
+ "babel-plugin-component": "^1.1.1",
32
+ "eslint": "^5.16.0",
33
+ "eslint-plugin-vue": "^5.0.0",
34
+ "file-loader": "^5.0.2",
35
+ "raw-loader": "^0.5.1",
36
+ "transform-loader": "^0.2.4",
37
+ "typescript": "^4.4.3",
38
+ "vue-custom-element": "^3.3.0",
39
+ "vue-template-compiler": "^2.6.10",
40
+ "webpack-node-externals": "^2.5.2"
41
+ },
42
+ "eslintConfig": {
43
+ "root": true,
44
+ "env": {
45
+ "node": true
46
+ },
47
+ "extends": [
48
+ "plugin:vue/essential",
49
+ "eslint:recommended"
50
+ ],
51
+ "rules": {},
52
+ "parserOptions": {
53
+ "parser": "babel-eslint"
54
+ }
55
+ },
56
+ "postcss": {
57
+ "plugins": {
58
+ "autoprefixer": {}
59
+ }
60
+ },
61
+ "browserslist": [
62
+ "> 1%",
63
+ "last 2 versions"
64
+ ]
65
+ }
package/public/index.html CHANGED
@@ -1,17 +1,17 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
- <title>Map Sidebar</title>
9
- </head>
10
- <body>
11
- <noscript>
12
- <strong>We're sorry but scaffoldvuer doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13
- </noscript>
14
- <map-side-bar></map-side-bar>
15
- <!-- built files will be auto injected -->
16
- </body>
17
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
+ <title>Map Sidebar</title>
9
+ </head>
10
+ <body>
11
+ <noscript>
12
+ <strong>We're sorry but scaffoldvuer doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13
+ </noscript>
14
+ <map-side-bar></map-side-bar>
15
+ <!-- built files will be auto injected -->
16
+ </body>
17
+ </html>
@@ -0,0 +1,30 @@
1
+ {
2
+ "description": "This dataset contains single cell scale anatomical map of the rat intrinsic cardiac nervous system (ICNS) across four male and three female hearts. These cell clusters can be seen by the yellow data points on the image as well as spherical markers on the 3D heart scaffold. The dataset provides an integrative framework to visualise the spatial distribution of ICNS across different hearts.",
3
+ "heading": "Mapped ICN samples",
4
+ "id": "sparc.science.context_data",
5
+ "samples": [
6
+ {
7
+ "annotation": "",
8
+ "description": "Spatial location of isolated ICNS mapped onto a generic heart scaffold",
9
+ "doi": "",
10
+ "heading": "ICNS from subject M54-8",
11
+ "id": "Sample 1",
12
+ "path": "",
13
+ "view": "View 1",
14
+ "color": "#FFFF00",
15
+ "thumbnail": "https://raw.githubusercontent.com/ABI-Software/map-sidebar/main/assets/temp-pics/orange.png"
16
+ },
17
+ {
18
+ "annotation": "",
19
+ "description": "Spatial location of isolated ICNS mapped onto a generic heart scaffold",
20
+ "doi": "",
21
+ "heading": "ICNS from subject M54-5",
22
+ "id": "Sample 2",
23
+ "path": "",
24
+ "view": "View 2",
25
+ "color": "#FFA500",
26
+ "thumbnail": "https://raw.githubusercontent.com/ABI-Software/map-sidebar/main/assets/temp-pics/teal.png"
27
+ }
28
+ ],
29
+ "version": "0.1.0"
30
+ }
package/src/App.vue CHANGED
@@ -1,133 +1,137 @@
1
- <template>
2
- <div id="app">
3
- <link rel="stylesheet"
4
- href="https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap">
5
- Click arrow to open sidebar
6
- <el-button @click="openSearch">search 'heart' from refs</el-button>
7
- <el-button @click="singleFacets">Add to Filter</el-button>
8
- <el-button @click="multiFacets">multiple facets</el-button>
9
- <el-button @click="neuronSearch">open neuron search</el-button>
10
- <SideBar :envVars="envVars" class="side-bar" ref="sideBar" :visible="sideBarVisibility"
11
- :tabs="tabs" :activeId="activeId" @tabClicked="tabClicked"
12
- @search-changed="searchChanged($event)" @actionClick="action"/>
13
- </div>
14
- </template>
15
-
16
- <script>
17
- /* eslint-disable no-alert, no-console */
18
- // optionally import default styles
19
- import SideBar from './components/SideBar'
20
-
21
- // let testContext = {
22
- // "description": "3D digital tracings of the enteric plexus obtained from seven subjects (M11, M16, M162, M163, M164, M168) are mapped randomly on mouse proximal colon. The data depicts individual neural wiring patterns in enteric microcircuits, and revealed both neuron and fiber units wired in a complex organization.",
23
- // "heading": "Digital tracings of enteric plexus",
24
- // "id": "sparc.science.context_data",
25
- // "samples": [
26
- // {
27
- // "annotation": "",
28
- // "description": "Neuronal soma and fibers in a myenteric ganglion in this subject are annotated into the following groups to highlight their interactions:\n\nNeuron1,2,3 Connex: Connections between 3 neurons and cross-ganglionic fibers\n\nNeuron4_Connex: A small neuron contacts fibers passing the ganglion\n\nNeuron5: Multiple projections of a neuron in an myenteric ganglion\n\nNeuron5,3,7 Connex: Connections between 3 neurons, nerve fibers, IGNEx (complex type of intraganglionic nerve endings) and fibers in the circular muscles.\n\nNeuron8,9,10 Connex: Connections of 3 neurons with each other and with long passing fibers. \n\nIntraganglionic Nerve Ending (IGNE): Digital traces of neurites consist of complex intraganglionic nerve endings. The blue fiber has branched terminals, more likely the afferent nerve endings; the violet and cyan terminals also interweave into the fiber nest; the orange, pink and peach fibers and one process of the neuron cross the IGNE to make 1-2 conjunctions. \n",
29
- // "doi": "",
30
- // "heading": "Digital tracing for subject M11",
31
- // "id": "Sample 1",
32
- // "path": "files/derivative/sub-M11/sam-pCm11/digital-traces/pC PHPS XFP M11 20XZ 180425_180713_2_NL_20.xml",
33
- // "view": "View 1"
34
- // },
35
- // {
36
- // "annotation": "",
37
- // "description": "This digital trace demonstrates some types of wiring. A long process of the green neuron terminates in the intraganglionic nerve endings (IGNE) while in contact with a nerve fiber (cyan), soma of a neuron (peach) and processes of 3 neurons (magenta, yellow and red). Two neurons and one fiber are traced to an IGNE. ",
38
- // "doi": "",
39
- // "heading": "Digital tracing for subject M16",
40
- // "id": "Sample 2",
41
- // "path": "files/derivative/sub-M16/sam-pCm16/digital-traces/pC PHPS XFP M16 20XZ 180425_180524.xml",
42
- // "view": "View 2"
43
- // }
44
- // ],
45
- // "version": "0.1.0",
46
- // "views": [
47
- // {
48
- // "annotation": "--",
49
- // "description": "Digital tracing of neurons for subject M11.",
50
- // "id": "View 1",
51
- // "path": "files/derivative/Scaffolds/M11_view.json",
52
- // "sample": "Sample 1",
53
- // "thumbnail": "files/derivative/Scaffolds/M11_thumbnail.jpeg"
54
- // },
55
- // {
56
- // "annotation": "--",
57
- // "description": "Digital tracing of neurons for subject M16.",
58
- // "id": "View 2",
59
- // "path": "files/derivative/Scaffolds/M16_view.json",
60
- // "sample": "Sample 2",
61
- // "thumbnail": "files/derivative/Scaffolds/M16_thumbnail.jpeg"
62
- // }
63
- // ]
64
- // }
65
- export default {
66
- name: 'app',
67
- components: {
68
- SideBar
69
- },
70
- computed: {
71
- tabs: function(){
72
- let temp = [...this.tabArray]
73
- for(let i in this.tabArray){
74
- temp[i].contextCard = this.contextArray[i]
75
- }
76
- return temp
77
- }
78
- },
79
- data: function(){
80
- return {
81
- tabArray: [{title: 'Flatmap', id:1}],
82
- contextArray: [null,null,null],
83
- sideBarVisibility: true,
84
- envVars: {
85
- API_LOCATION: process.env.VUE_APP_API_LOCATION,
86
- ALGOLIA_KEY: process.env.VUE_APP_ALGOLIA_KEY,
87
- ALGOLIA_ID: process.env.VUE_APP_ALGOLIA_ID,
88
- ALGOLIA_INDEX: process.env.VUE_APP_ALGOLIA_INDEX,
89
- PENNSIEVE_API_LOCATION: process.env.VUE_APP_PENNSIEVE_API_LOCATION,
90
- BL_SERVER_URL: process.env.VUE_APP_BL_SERVER_URL,
91
- NL_LINK_PREFIX: process.env.VUE_APP_NL_LINK_PREFIX,
92
- ROOT_URL: process.env.VUE_APP_ROOT_URL,
93
- },
94
- activeId: 1,
95
- }
96
- },
97
- methods:{
98
- searchChanged: function(data){
99
- console.log(data);
100
- },
101
- tabClicked: function(id){
102
- this.activeId = id
103
- },
104
- action: function(val){
105
- console.log("action fired: ", val)
106
- },
107
- openSearch: function(){
108
- this.$refs.sideBar.openSearch([], 'heart')
109
- },
110
- singleFacets: function(){
111
- this.$refs.sideBar.addFilter({facet: 'Heart', term:'Anatomical structure', facetPropPath: 'anatomy.organ.name'})
112
- },
113
- multiFacets: function(){
114
- this.$refs.sideBar.openSearch([{facet: 'Male', term:'Sex', facetPropPath:'attributes.subject.sex.value'}, {facet: 'Heart', term:'Anatomical structure', facetPropPath: 'anatomy.organ.name'}], '')
115
- },
116
- neuronSearch: function(){
117
- this.$refs.sideBar.openNeuronSearch('neuron-type-keast-10')
118
- }
119
- }
120
- }
121
- </script>
122
-
123
- <style>
124
- #app {
125
- height:100%;
126
- width: 100%;
127
- position:absolute;
128
- font-family: "Asap",sans-serif;
129
- }
130
- body {
131
- margin:0px;
132
- }
133
- </style>
1
+ <template>
2
+ <div id="app">
3
+ <link rel="stylesheet"
4
+ href="https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap">
5
+ Click arrow to open sidebar
6
+ <el-button @click="openSearch">search 'heart' from refs</el-button>
7
+ <el-button @click="singleFacets">Add to Filter</el-button>
8
+ <el-button @click="multiFacets">multiple facets</el-button>
9
+ <el-button @click="neuronSearch">open neuron search</el-button>
10
+ <el-button @click="keywordSearch">keyword search</el-button>
11
+ <SideBar :envVars="envVars" class="side-bar" ref="sideBar" :visible="sideBarVisibility"
12
+ :tabs="tabs" :activeId="activeId" @tabClicked="tabClicked"
13
+ @search-changed="searchChanged($event)" @actionClick="action"/>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ /* eslint-disable no-alert, no-console */
19
+ // optionally import default styles
20
+ import SideBar from './components/SideBar'
21
+
22
+ // let testContext = {
23
+ // "description": "3D digital tracings of the enteric plexus obtained from seven subjects (M11, M16, M162, M163, M164, M168) are mapped randomly on mouse proximal colon. The data depicts individual neural wiring patterns in enteric microcircuits, and revealed both neuron and fiber units wired in a complex organization.",
24
+ // "heading": "Digital tracings of enteric plexus",
25
+ // "id": "sparc.science.context_data",
26
+ // "samples": [
27
+ // {
28
+ // "annotation": "",
29
+ // "description": "Neuronal soma and fibers in a myenteric ganglion in this subject are annotated into the following groups to highlight their interactions:\n\nNeuron1,2,3 Connex: Connections between 3 neurons and cross-ganglionic fibers\n\nNeuron4_Connex: A small neuron contacts fibers passing the ganglion\n\nNeuron5: Multiple projections of a neuron in an myenteric ganglion\n\nNeuron5,3,7 Connex: Connections between 3 neurons, nerve fibers, IGNEx (complex type of intraganglionic nerve endings) and fibers in the circular muscles.\n\nNeuron8,9,10 Connex: Connections of 3 neurons with each other and with long passing fibers. \n\nIntraganglionic Nerve Ending (IGNE): Digital traces of neurites consist of complex intraganglionic nerve endings. The blue fiber has branched terminals, more likely the afferent nerve endings; the violet and cyan terminals also interweave into the fiber nest; the orange, pink and peach fibers and one process of the neuron cross the IGNE to make 1-2 conjunctions. \n",
30
+ // "doi": "",
31
+ // "heading": "Digital tracing for subject M11",
32
+ // "id": "Sample 1",
33
+ // "path": "files/derivative/sub-M11/sam-pCm11/digital-traces/pC PHPS XFP M11 20XZ 180425_180713_2_NL_20.xml",
34
+ // "view": "View 1"
35
+ // },
36
+ // {
37
+ // "annotation": "",
38
+ // "description": "This digital trace demonstrates some types of wiring. A long process of the green neuron terminates in the intraganglionic nerve endings (IGNE) while in contact with a nerve fiber (cyan), soma of a neuron (peach) and processes of 3 neurons (magenta, yellow and red). Two neurons and one fiber are traced to an IGNE. ",
39
+ // "doi": "",
40
+ // "heading": "Digital tracing for subject M16",
41
+ // "id": "Sample 2",
42
+ // "path": "files/derivative/sub-M16/sam-pCm16/digital-traces/pC PHPS XFP M16 20XZ 180425_180524.xml",
43
+ // "view": "View 2"
44
+ // }
45
+ // ],
46
+ // "version": "0.1.0",
47
+ // "views": [
48
+ // {
49
+ // "annotation": "--",
50
+ // "description": "Digital tracing of neurons for subject M11.",
51
+ // "id": "View 1",
52
+ // "path": "files/derivative/Scaffolds/M11_view.json",
53
+ // "sample": "Sample 1",
54
+ // "thumbnail": "files/derivative/Scaffolds/M11_thumbnail.jpeg"
55
+ // },
56
+ // {
57
+ // "annotation": "--",
58
+ // "description": "Digital tracing of neurons for subject M16.",
59
+ // "id": "View 2",
60
+ // "path": "files/derivative/Scaffolds/M16_view.json",
61
+ // "sample": "Sample 2",
62
+ // "thumbnail": "files/derivative/Scaffolds/M16_thumbnail.jpeg"
63
+ // }
64
+ // ]
65
+ // }
66
+ export default {
67
+ name: 'app',
68
+ components: {
69
+ SideBar
70
+ },
71
+ computed: {
72
+ tabs: function(){
73
+ let temp = [...this.tabArray]
74
+ for(let i in this.tabArray){
75
+ temp[i].contextCard = this.contextArray[i]
76
+ }
77
+ return temp
78
+ }
79
+ },
80
+ data: function(){
81
+ return {
82
+ tabArray: [{title: 'Flatmap', id:1}],
83
+ contextArray: [null,null,null],
84
+ sideBarVisibility: true,
85
+ envVars: {
86
+ API_LOCATION: process.env.VUE_APP_API_LOCATION,
87
+ ALGOLIA_KEY: process.env.VUE_APP_ALGOLIA_KEY,
88
+ ALGOLIA_ID: process.env.VUE_APP_ALGOLIA_ID,
89
+ ALGOLIA_INDEX: process.env.VUE_APP_ALGOLIA_INDEX,
90
+ PENNSIEVE_API_LOCATION: process.env.VUE_APP_PENNSIEVE_API_LOCATION,
91
+ BL_SERVER_URL: process.env.VUE_APP_BL_SERVER_URL,
92
+ NL_LINK_PREFIX: process.env.VUE_APP_NL_LINK_PREFIX,
93
+ ROOT_URL: process.env.VUE_APP_ROOT_URL,
94
+ },
95
+ activeId: 1,
96
+ }
97
+ },
98
+ methods:{
99
+ searchChanged: function(data){
100
+ console.log(data);
101
+ },
102
+ tabClicked: function(id){
103
+ this.activeId = id
104
+ },
105
+ action: function(val){
106
+ console.log("action fired: ", val)
107
+ },
108
+ openSearch: function(){
109
+ this.$refs.sideBar.openSearch([], 'heart')
110
+ },
111
+ singleFacets: function(){
112
+ this.$refs.sideBar.addFilter({facet: 'Heart', term:'Anatomical structure', facetPropPath: 'anatomy.organ.name'})
113
+ },
114
+ multiFacets: function(){
115
+ this.$refs.sideBar.openSearch([{facet: 'Male', term:'Sex', facetPropPath:'attributes.subject.sex.value'}, {facet: 'Heart', term:'Anatomical structure', facetPropPath: 'anatomy.organ.name'}], '')
116
+ },
117
+ keywordSearch: function(){
118
+ this.$refs.sideBar.openSearch([{facet: 'http://purl.obolibrary.org/obo/UBERON_0001103', term:'Keywords', facetPropPath:'item.keywords.keyword'}])
119
+ },
120
+ neuronSearch: function(){
121
+ this.$refs.sideBar.openNeuronSearch('ilxtr:neuron-type-keast-10')
122
+ }
123
+ }
124
+ }
125
+ </script>
126
+
127
+ <style>
128
+ #app {
129
+ height:100%;
130
+ width: 100%;
131
+ position:absolute;
132
+ font-family: "Asap",sans-serif;
133
+ }
134
+ body {
135
+ margin:0px;
136
+ }
137
+ </style>