@abi-software/map-side-bar 1.5.0 → 1.5.1

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 (43) hide show
  1. package/CHANGELOG.md +228 -228
  2. package/LICENSE +201 -201
  3. package/README.md +146 -146
  4. package/babel.config.js +14 -14
  5. package/del.json +27 -0
  6. package/dist/map-side-bar.common.js +1543 -1015
  7. package/dist/map-side-bar.common.js.map +1 -1
  8. package/dist/map-side-bar.css +1 -1
  9. package/dist/map-side-bar.umd.js +1543 -1015
  10. package/dist/map-side-bar.umd.js.map +1 -1
  11. package/dist/map-side-bar.umd.min.js +3 -1
  12. package/dist/map-side-bar.umd.min.js.map +1 -1
  13. package/package-lock.json +14536 -14536
  14. package/package.json +75 -75
  15. package/public/index.html +17 -17
  16. package/scaffold_context_info.json +31 -0
  17. package/src/App.vue +164 -164
  18. package/src/algolia/algolia.js +188 -188
  19. package/src/algolia/utils.js +69 -69
  20. package/src/assets/_variables.scss +43 -43
  21. package/src/assets/styles.scss +7 -7
  22. package/src/components/BadgesGroup.vue +144 -144
  23. package/src/components/Cascader.vue +49 -49
  24. package/src/components/ContextCard.vue +397 -397
  25. package/src/components/DatasetCard.vue +328 -328
  26. package/src/components/EventBus.js +3 -3
  27. package/src/components/FlatmapDatasetCard.vue +172 -0
  28. package/src/components/ImageGallery.vue +531 -531
  29. package/src/components/PMRDatasetCard.vue +162 -0
  30. package/src/components/SearchFilters.vue +587 -587
  31. package/src/components/SideBar.vue +235 -232
  32. package/src/components/SidebarContent.vue +554 -554
  33. package/src/components/Tabs.vue +78 -78
  34. package/src/components/allPaths.js +5928 -0
  35. package/src/components/hardcoded-context-info.js +79 -79
  36. package/src/components/index.js +8 -8
  37. package/src/components/pmrTest.js +1139 -0
  38. package/src/components/processFilters.js +22 -0
  39. package/src/components/species-map.js +8 -8
  40. package/src/main.js +8 -8
  41. package/src/mixins/S3Bucket.vue +31 -31
  42. package/static.json +6 -6
  43. package/vue.config.js +19 -19
@@ -1,232 +1,235 @@
1
- <template>
2
- <div ref="container">
3
- <div v-if="!drawerOpen" @click="toggleDrawer" class="open-tab">
4
- <i class="el-icon-arrow-left"></i>
5
- </div>
6
- <el-drawer
7
- custom-class="my-drawer"
8
- class="side-bar"
9
- :visible.sync="drawerOpen"
10
- :appendToBody="false"
11
- :modal-append-to-body="false"
12
- size=550
13
- :with-header="false"
14
- :wrapperClosable="false"
15
- :modal="false"
16
- >
17
- <div class="box-card">
18
- <div v-if="drawerOpen" @click="close" class="close-tab">
19
- <i class="el-icon-arrow-right"></i>
20
- </div>
21
- <div class="sidebar-container">
22
- <tabs v-if="tabs.length > 1" :tabTitles="tabs" :activeId="activeId"
23
- @titleClicked="tabClicked"/>
24
- <template v-for="tab in tabs">
25
- <sidebar-content class="sidebar-content-container"
26
- v-show="tab.id===activeId" :contextCardEntry="tab.contextCard"
27
- :envVars="envVars"
28
- v-bind:key="tab.id" :ref="tab.id"
29
- @search-changed="searchChanged(tab.id, $event)"/>
30
- </template>
31
- </div>
32
- </div>
33
- </el-drawer>
34
- </div>
35
- </template>
36
-
37
-
38
- <script>
39
- /* eslint-disable no-alert, no-console */
40
- import Vue from "vue";
41
- import {
42
- Drawer,
43
- Icon,
44
- } from "element-ui";
45
- import lang from "element-ui/lib/locale/lang/en";
46
- import locale from "element-ui/lib/locale";
47
- import SidebarContent from './SidebarContent.vue';
48
- import EventBus from './EventBus';
49
- import Tabs from './Tabs'
50
-
51
- locale.use(lang);
52
- Vue.use(Drawer);
53
- Vue.use(Icon);
54
-
55
- export default {
56
- components: {SidebarContent, Tabs },
57
- name: "SideBar",
58
- props: {
59
- visible: {
60
- type: Boolean,
61
- default: false
62
- },
63
- envVars: {
64
- type: Object,
65
- default: () => {}
66
- },
67
- tabs: {
68
- type: Array,
69
- default: () => [{title:'flatmap', id:1}]
70
- },
71
- activeId: {
72
- type: Number,
73
- default: 1
74
- },
75
- openAtStart: {
76
- type: Boolean,
77
- default: false
78
- }
79
- },
80
- data: function () {
81
- return {
82
- drawerOpen: false,
83
- }
84
- },
85
- methods: {
86
- searchChanged: function (id, data) {
87
- this.$emit("search-changed", {...data, id: id});
88
- },
89
- close: function () {
90
- this.drawerOpen = false;
91
- },
92
- toggleDrawer: function () {
93
- this.drawerOpen = !this.drawerOpen;
94
- },
95
- openSearch: function(facets, query){
96
- this.drawerOpen = true;
97
- // Because refs are in v-for, nextTick is needed here
98
- Vue.nextTick(()=>{this.$refs[this.activeId][0].openSearch(facets, query)})
99
- },
100
- addFilter: function(filter){
101
- this.drawerOpen = true;
102
- filter.AND = true // When we add a filter external, it is currently only with an AND boolean
103
-
104
- // Because refs are in v-for, nextTick is needed here
105
- Vue.nextTick(()=>{this.$refs[this.activeId][0].addFilter(filter)})
106
- },
107
- openNeuronSearch: function(neuron){
108
- this.drawerOpen = true;
109
- // Because refs are in v-for, nextTick is needed here
110
- Vue.nextTick(()=>{this.$refs[this.activeId][0].openSearch('', undefined, 'scicrunch-query-string/', {'field': '*organ.curie', 'curie':neuron})})
111
- },
112
- getAlgoliaFacets: async function(){
113
- return await this.$refs[this.activeId][0].getAlgoliaFacets()
114
- },
115
- tabClicked: function(id) {
116
- this.$emit("tabClicked", id);
117
- },
118
- },
119
- created:function() {
120
- this.drawerOpen = this.openAtStart;
121
- },
122
- mounted: function(){
123
- EventBus.$on("PopoverActionClick", (payLoad) => {
124
- this.$emit("actionClick", payLoad);
125
- })
126
- EventBus.$on('available-facets', (payLoad)=> {
127
- this.$emit('search-changed', {
128
- type: 'available-facets',
129
- value: payLoad
130
- })
131
- })
132
- EventBus.$on('contextUpdate', (payLoad)=> {
133
- this.$emit('contextUpdate', payLoad)
134
- })
135
- }
136
- };
137
- </script>
138
-
139
- <!-- Add "scoped" attribute to limit CSS to this component only -->
140
- <style scoped lang="scss">
141
- @import "~element-ui/packages/theme-chalk/src/drawer";
142
- @import "~element-ui/packages/theme-chalk/src/icon";
143
-
144
- .box-card {
145
- flex: 3;
146
- height: 100%;
147
- overflow: hidden;
148
- pointer-events: auto;
149
- }
150
-
151
- .side-bar{
152
- position: relative;
153
- height: 100%;
154
- pointer-events: none;
155
- }
156
-
157
- .side-bar ::v-deep .el-drawer:focus{
158
- outline:none;
159
- }
160
-
161
- .sidebar-container {
162
- height: 100%;
163
- flex-flow: column;
164
- display: flex;
165
- }
166
-
167
- .open-tab{
168
- width: 20px;
169
- height: 40px;
170
- z-index: 8;
171
- position: absolute;
172
- top: calc(50vh - 80px);
173
- right: 0px;
174
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
175
- border: solid 1px $app-primary-color;
176
- background-color: #f9f2fc;
177
- text-align: center;
178
- vertical-align: middle;
179
- cursor: pointer;
180
- pointer-events: auto;
181
- }
182
-
183
- .el-icon-arrow-left,
184
- .el-icon-arrow-right
185
- {
186
- font-weight: 600;
187
- margin-top: 12px;
188
- color: $app-primary-color;
189
- cursor: pointer;
190
- pointer-events: auto;
191
- transform: scaleY(2.0);
192
- text-align: center;
193
- vertical-align: middle;
194
- }
195
-
196
- .close-tab{
197
- float: left;
198
- flex: 1;
199
- width: 20px;
200
- height: 40px;
201
- z-index: 8;
202
- margin-top: calc(50vh - 80px);
203
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
204
- border: solid 1px $app-primary-color;
205
- background-color: #f9f2fc;
206
- text-align: center;
207
- vertical-align: middle;
208
- cursor: pointer;
209
- pointer-events: auto;
210
- }
211
-
212
- .box-card {
213
- flex: 3;
214
- height: 100%;
215
- overflow: hidden;
216
- pointer-events: auto;
217
- }
218
-
219
- ::v-deep .my-drawer {
220
- background: rgba(0,0,0,0);
221
- box-shadow: none;
222
- }
223
-
224
- ::v-deep .my-drawer .el-drawer__body {
225
- height: 100%;
226
- }
227
-
228
- .sidebar-content-container {
229
- flex: 1 1 auto;
230
- }
231
-
232
- </style>
1
+ <template>
2
+ <div ref="container">
3
+ <div v-if="!drawerOpen" @click="toggleDrawer" class="open-tab">
4
+ <i class="el-icon-arrow-left"></i>
5
+ </div>
6
+ <el-drawer
7
+ custom-class="my-drawer"
8
+ class="side-bar"
9
+ :visible.sync="drawerOpen"
10
+ :appendToBody="false"
11
+ :modal-append-to-body="false"
12
+ size=550
13
+ :with-header="false"
14
+ :wrapperClosable="false"
15
+ :modal="false"
16
+ >
17
+ <div class="box-card">
18
+ <div v-if="drawerOpen" @click="close" class="close-tab">
19
+ <i class="el-icon-arrow-right"></i>
20
+ </div>
21
+ <div class="sidebar-container">
22
+ <tabs v-if="tabs.length > 1" :tabTitles="tabs" :activeId="activeId"
23
+ @titleClicked="tabClicked"/>
24
+ <template v-for="tab in tabs">
25
+ <sidebar-content class="sidebar-content-container"
26
+ v-show="tab.id===activeId" :contextCardEntry="tab.contextCard"
27
+ :envVars="envVars"
28
+ v-bind:key="tab.id" :ref="tab.id"
29
+ @search-changed="searchChanged(tab.id, $event)"/>
30
+ </template>
31
+ </div>
32
+ </div>
33
+ </el-drawer>
34
+ </div>
35
+ </template>
36
+
37
+
38
+ <script>
39
+ /* eslint-disable no-alert, no-console */
40
+ import Vue from "vue";
41
+ import {
42
+ Drawer,
43
+ Icon,
44
+ } from "element-ui";
45
+ import lang from "element-ui/lib/locale/lang/en";
46
+ import locale from "element-ui/lib/locale";
47
+ import SidebarContent from './SidebarContent.vue';
48
+ import EventBus from './EventBus';
49
+ import Tabs from './Tabs'
50
+
51
+ locale.use(lang);
52
+ Vue.use(Drawer);
53
+ Vue.use(Icon);
54
+
55
+ export default {
56
+ components: {SidebarContent, Tabs },
57
+ name: "SideBar",
58
+ props: {
59
+ visible: {
60
+ type: Boolean,
61
+ default: false
62
+ },
63
+ envVars: {
64
+ type: Object,
65
+ default: () => {}
66
+ },
67
+ tabs: {
68
+ type: Array,
69
+ default: () => [{title:'flatmap', id:1}]
70
+ },
71
+ activeId: {
72
+ type: Number,
73
+ default: 1
74
+ },
75
+ openAtStart: {
76
+ type: Boolean,
77
+ default: false
78
+ }
79
+ },
80
+ data: function () {
81
+ return {
82
+ drawerOpen: false,
83
+ }
84
+ },
85
+ methods: {
86
+ searchChanged: function (id, data) {
87
+ this.$emit("search-changed", {...data, id: id});
88
+ },
89
+ close: function () {
90
+ this.drawerOpen = false;
91
+ },
92
+ toggleDrawer: function () {
93
+ this.drawerOpen = !this.drawerOpen;
94
+ },
95
+ openSearch: function(facets, query){
96
+ this.drawerOpen = true;
97
+ // Because refs are in v-for, nextTick is needed here
98
+ Vue.nextTick(()=>{this.$refs[this.activeId][0].openSearch(facets, query)})
99
+ },
100
+ addFilter: function(filter){
101
+ this.drawerOpen = true;
102
+ filter.AND = true // When we add a filter external, it is currently only with an AND boolean
103
+
104
+ // Because refs are in v-for, nextTick is needed here
105
+ Vue.nextTick(()=>{this.$refs[this.activeId][0].addFilter(filter)})
106
+ },
107
+ openNeuronSearch: function(neuron){
108
+ this.drawerOpen = true;
109
+ // Because refs are in v-for, nextTick is needed here
110
+ Vue.nextTick(()=>{this.$refs[this.activeId][0].openSearch('', undefined, 'scicrunch-query-string/', {'field': '*organ.curie', 'curie':neuron})})
111
+ },
112
+ getAlgoliaFacets: async function(){
113
+ return await this.$refs[this.activeId][0].getAlgoliaFacets()
114
+ },
115
+ setDrawerOpen: function(value=true){
116
+ this.drawerOpen = value;
117
+ },
118
+ tabClicked: function(id) {
119
+ this.$emit("tabClicked", id);
120
+ },
121
+ },
122
+ created:function() {
123
+ this.drawerOpen = this.openAtStart;
124
+ },
125
+ mounted: function(){
126
+ EventBus.$on("PopoverActionClick", (payLoad) => {
127
+ this.$emit("actionClick", payLoad);
128
+ })
129
+ EventBus.$on('available-facets', (payLoad)=> {
130
+ this.$emit('search-changed', {
131
+ type: 'available-facets',
132
+ value: payLoad
133
+ })
134
+ })
135
+ EventBus.$on('contextUpdate', (payLoad)=> {
136
+ this.$emit('contextUpdate', payLoad)
137
+ })
138
+ }
139
+ };
140
+ </script>
141
+
142
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
143
+ <style scoped lang="scss">
144
+ @import "~element-ui/packages/theme-chalk/src/drawer";
145
+ @import "~element-ui/packages/theme-chalk/src/icon";
146
+
147
+ .box-card {
148
+ flex: 3;
149
+ height: 100%;
150
+ overflow: hidden;
151
+ pointer-events: auto;
152
+ }
153
+
154
+ .side-bar{
155
+ position: relative;
156
+ height: 100%;
157
+ pointer-events: none;
158
+ }
159
+
160
+ .side-bar ::v-deep .el-drawer:focus{
161
+ outline:none;
162
+ }
163
+
164
+ .sidebar-container {
165
+ height: 100%;
166
+ flex-flow: column;
167
+ display: flex;
168
+ }
169
+
170
+ .open-tab{
171
+ width: 20px;
172
+ height: 40px;
173
+ z-index: 8;
174
+ position: absolute;
175
+ top: calc(50vh - 80px);
176
+ right: 0px;
177
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
178
+ border: solid 1px $app-primary-color;
179
+ background-color: #f9f2fc;
180
+ text-align: center;
181
+ vertical-align: middle;
182
+ cursor: pointer;
183
+ pointer-events: auto;
184
+ }
185
+
186
+ .el-icon-arrow-left,
187
+ .el-icon-arrow-right
188
+ {
189
+ font-weight: 600;
190
+ margin-top: 12px;
191
+ color: $app-primary-color;
192
+ cursor: pointer;
193
+ pointer-events: auto;
194
+ transform: scaleY(2.0);
195
+ text-align: center;
196
+ vertical-align: middle;
197
+ }
198
+
199
+ .close-tab{
200
+ float: left;
201
+ flex: 1;
202
+ width: 20px;
203
+ height: 40px;
204
+ z-index: 8;
205
+ margin-top: calc(50vh - 80px);
206
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
207
+ border: solid 1px $app-primary-color;
208
+ background-color: #f9f2fc;
209
+ text-align: center;
210
+ vertical-align: middle;
211
+ cursor: pointer;
212
+ pointer-events: auto;
213
+ }
214
+
215
+ .box-card {
216
+ flex: 3;
217
+ height: 100%;
218
+ overflow: hidden;
219
+ pointer-events: auto;
220
+ }
221
+
222
+ ::v-deep .my-drawer {
223
+ background: rgba(0,0,0,0);
224
+ box-shadow: none;
225
+ }
226
+
227
+ ::v-deep .my-drawer .el-drawer__body {
228
+ height: 100%;
229
+ }
230
+
231
+ .sidebar-content-container {
232
+ flex: 1 1 auto;
233
+ }
234
+
235
+ </style>