@abi-software/map-side-bar 1.2.2 → 1.3.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/package.json CHANGED
@@ -1,64 +1,65 @@
1
- {
2
- "name": "@abi-software/map-side-bar",
3
- "version": "1.2.2",
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/svg-sprite": "^0.1.14",
21
- "algoliasearch": "^4.10.5",
22
- "element-ui": "^2.13.0",
23
- "vue": "^2.6.10"
24
- },
25
- "devDependencies": {
26
- "@vue/cli-plugin-babel": "^4.0.0",
27
- "@vue/cli-plugin-eslint": "^4.0.0",
28
- "@vue/cli-service": "^4.0.0",
29
- "babel-eslint": "^10.0.3",
30
- "babel-plugin-component": "^1.1.1",
31
- "eslint": "^5.16.0",
32
- "eslint-plugin-vue": "^5.0.0",
33
- "file-loader": "^5.0.2",
34
- "raw-loader": "^0.5.1",
35
- "transform-loader": "^0.2.4",
36
- "typescript": "^4.4.3",
37
- "vue-custom-element": "^3.3.0",
38
- "vue-template-compiler": "^2.6.10",
39
- "webpack-node-externals": "^2.5.2"
40
- },
41
- "eslintConfig": {
42
- "root": true,
43
- "env": {
44
- "node": true
45
- },
46
- "extends": [
47
- "plugin:vue/essential",
48
- "eslint:recommended"
49
- ],
50
- "rules": {},
51
- "parserOptions": {
52
- "parser": "babel-eslint"
53
- }
54
- },
55
- "postcss": {
56
- "plugins": {
57
- "autoprefixer": {}
58
- }
59
- },
60
- "browserslist": [
61
- "> 1%",
62
- "last 2 versions"
63
- ]
64
- }
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
+ }
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>scaffoldvuer</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>
package/src/App.vue CHANGED
@@ -1,130 +1,133 @@
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},{title: 'Heart Scaffold', id:2},{title: 'Stomach Scaffold', id:3}],
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
- },
91
- activeId: 1,
92
- }
93
- },
94
- methods:{
95
- searchChanged: function(data){
96
- console.log(data);
97
- },
98
- tabClicked: function(id){
99
- this.activeId = id
100
- },
101
- action: function(val){
102
- console.log("action fired: ", val)
103
- },
104
- openSearch: function(){
105
- this.$refs.sideBar.openSearch('heart', [])
106
- },
107
- singleFacets: function(){
108
- this.$refs.sideBar.addFilter({facet: 'Heart', term:'Anatomical structure', facetPropPath: 'anatomy.organ.name'})
109
- },
110
- multiFacets: function(){
111
- this.$refs.sideBar.openSearch([{facet: 'Male', term:'Sex', facetPropPath:'attributes.subject.sex.value'}, {facet: 'Heart', term:'Anatomical structure', facetPropPath: 'anatomy.organ.name'}], '')
112
- },
113
- neuronSearch: function(){
114
- this.$refs.sideBar.openNeuronSearch('neuron-type-keast-10')
115
- }
116
- }
117
- }
118
- </script>
119
-
120
- <style>
121
- #app {
122
- height:100%;
123
- width: 100%;
124
- position:absolute;
125
- font-family: "Asap",sans-serif;
126
- }
127
- body {
128
- margin:0px;
129
- }
130
- </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
+ <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>