@abi-software/map-side-bar 2.2.0 → 2.2.1-alpha-2
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/.eslintrc.js +12 -12
- package/.postcssrc.json +5 -5
- package/LICENSE +201 -201
- package/README.md +168 -168
- package/dist/map-side-bar.js +6982 -7170
- package/dist/map-side-bar.umd.cjs +50 -103
- package/dist/style.css +1 -1
- package/package.json +72 -72
- package/src/App.vue +233 -233
- package/src/algolia/algolia.js +242 -211
- package/src/algolia/utils.js +101 -101
- package/src/assets/_variables.scss +43 -43
- package/src/assets/styles.scss +6 -6
- package/src/components/BadgesGroup.vue +124 -124
- package/src/components/DatasetCard.vue +356 -356
- package/src/components/EventBus.js +3 -3
- package/src/components/ImageGallery.vue +542 -542
- package/src/components/SearchFilters.vue +1000 -1000
- package/src/components/SearchHistory.vue +175 -175
- package/src/components/SideBar.vue +347 -338
- package/src/components/SidebarContent.vue +576 -576
- package/src/components/Tabs.vue +78 -78
- package/src/components/index.js +8 -8
- package/src/components/species-map.js +8 -8
- package/src/main.js +9 -9
- package/src/mixins/S3Bucket.vue +37 -37
- package/static.json +6 -6
- package/vite.config.js +55 -55
- package/vuese-generator.js +65 -65
|
@@ -1,338 +1,347 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div ref="container">
|
|
3
|
-
<div v-if="!drawerOpen" @click="toggleDrawer" class="open-tab">
|
|
4
|
-
<el-icon><el-icon-arrow-left /></el-icon>
|
|
5
|
-
</div>
|
|
6
|
-
<el-drawer
|
|
7
|
-
class="side-bar my-drawer"
|
|
8
|
-
v-model="drawerOpen"
|
|
9
|
-
:teleported="false"
|
|
10
|
-
:modal-append-to-body="false"
|
|
11
|
-
size="584"
|
|
12
|
-
:with-header="false"
|
|
13
|
-
:wrapperClosable="false"
|
|
14
|
-
:modal="false"
|
|
15
|
-
modal-class="sidebar-body"
|
|
16
|
-
:z-index="10"
|
|
17
|
-
:lock-scroll="false"
|
|
18
|
-
>
|
|
19
|
-
<div class="box-card">
|
|
20
|
-
<div v-if="drawerOpen" @click="close" class="close-tab">
|
|
21
|
-
<el-icon><el-icon-arrow-right /></el-icon>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="sidebar-container">
|
|
24
|
-
<Tabs
|
|
25
|
-
v-if="tabs.length > 1"
|
|
26
|
-
:tabTitles="tabs"
|
|
27
|
-
:activeId="activeId"
|
|
28
|
-
@titleClicked="tabClicked"
|
|
29
|
-
/>
|
|
30
|
-
<template v-for="tab in tabs" key="tab.id">
|
|
31
|
-
<SidebarContent
|
|
32
|
-
class="sidebar-content-container"
|
|
33
|
-
v-show="tab.id === activeId"
|
|
34
|
-
:contextCardEntry="tab.contextCard"
|
|
35
|
-
:envVars="envVars"
|
|
36
|
-
:ref="tab.id"
|
|
37
|
-
@search-changed="searchChanged(tab.id, $event)"
|
|
38
|
-
@hover-changed="hoverChanged($event)"
|
|
39
|
-
/>
|
|
40
|
-
</template>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</el-drawer>
|
|
44
|
-
</div>
|
|
45
|
-
</template>
|
|
46
|
-
|
|
47
|
-
<script>
|
|
48
|
-
import {
|
|
49
|
-
ArrowLeft as ElIconArrowLeft,
|
|
50
|
-
ArrowRight as ElIconArrowRight,
|
|
51
|
-
} from '@element-plus/icons-vue'
|
|
52
|
-
/* eslint-disable no-alert, no-console */
|
|
53
|
-
import { ElDrawer as Drawer, ElIcon as Icon } from 'element-plus'
|
|
54
|
-
import SidebarContent from './SidebarContent.vue'
|
|
55
|
-
import EventBus from './EventBus.js'
|
|
56
|
-
import Tabs from './Tabs.vue'
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Aims to provide a sidebar for searching capability for SPARC portal.
|
|
60
|
-
*/
|
|
61
|
-
export default {
|
|
62
|
-
components: {
|
|
63
|
-
SidebarContent,
|
|
64
|
-
Tabs,
|
|
65
|
-
ElIconArrowLeft,
|
|
66
|
-
ElIconArrowRight,
|
|
67
|
-
Drawer,
|
|
68
|
-
Icon
|
|
69
|
-
},
|
|
70
|
-
name: 'SideBar',
|
|
71
|
-
props: {
|
|
72
|
-
/**
|
|
73
|
-
* The option to show side bar.
|
|
74
|
-
*/
|
|
75
|
-
visible: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: false,
|
|
78
|
-
},
|
|
79
|
-
/**
|
|
80
|
-
* The environment variables object with
|
|
81
|
-
* `API_LOCATION`, `ALGOLIA_KEY`, `ALGOLIA_ID`,
|
|
82
|
-
* `ALGOLIA_INDEX`, `PENNSIEVE_API_LOCATION`, `BL_SERVER_URL`,
|
|
83
|
-
* `NL_LINK_PREFIX`, `ROOT_URL`
|
|
84
|
-
*/
|
|
85
|
-
envVars: {
|
|
86
|
-
type: Object,
|
|
87
|
-
default: () => {},
|
|
88
|
-
},
|
|
89
|
-
/**
|
|
90
|
-
* The array of objects to show multiple sidebar contents.
|
|
91
|
-
*/
|
|
92
|
-
tabs: {
|
|
93
|
-
type: Array,
|
|
94
|
-
default: () => [{ title: 'flatmap', id: 1 }],
|
|
95
|
-
},
|
|
96
|
-
/**
|
|
97
|
-
* The active tab id for default tab.
|
|
98
|
-
*/
|
|
99
|
-
activeId: {
|
|
100
|
-
type: Number,
|
|
101
|
-
default: 1,
|
|
102
|
-
},
|
|
103
|
-
/**
|
|
104
|
-
* The option to show or hide sidebar on page load.
|
|
105
|
-
*/
|
|
106
|
-
openAtStart: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: false,
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
data: function () {
|
|
112
|
-
return {
|
|
113
|
-
drawerOpen: false,
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
methods: {
|
|
117
|
-
/**
|
|
118
|
-
* This event is emitted when the mouse hover are changed.
|
|
119
|
-
* @arg data
|
|
120
|
-
*/
|
|
121
|
-
hoverChanged: function (data) {
|
|
122
|
-
this.$emit('hover-changed', data)
|
|
123
|
-
},
|
|
124
|
-
/**
|
|
125
|
-
* This event is emitted when the search filters are changed.
|
|
126
|
-
* @arg `obj` {data, id}
|
|
127
|
-
*/
|
|
128
|
-
searchChanged: function (id, data) {
|
|
129
|
-
this.$emit('search-changed', { ...data, id: id })
|
|
130
|
-
},
|
|
131
|
-
/**
|
|
132
|
-
* @vuese
|
|
133
|
-
* The function to close sidebar.
|
|
134
|
-
*/
|
|
135
|
-
close: function () {
|
|
136
|
-
this.drawerOpen = false
|
|
137
|
-
},
|
|
138
|
-
/**
|
|
139
|
-
* @vuese
|
|
140
|
-
* The function to toggle (open and close) sidebar.
|
|
141
|
-
*/
|
|
142
|
-
toggleDrawer: function () {
|
|
143
|
-
this.drawerOpen = !this.drawerOpen
|
|
144
|
-
},
|
|
145
|
-
openSearch: function (facets, query) {
|
|
146
|
-
this.drawerOpen = true
|
|
147
|
-
// Because refs are in v-for, nextTick is needed here
|
|
148
|
-
this.$nextTick(() => {
|
|
149
|
-
this.$refs[this.activeId][0].openSearch(facets, query)
|
|
150
|
-
})
|
|
151
|
-
},
|
|
152
|
-
/**
|
|
153
|
-
* @vuese
|
|
154
|
-
* The function to add filters to sidebar search.
|
|
155
|
-
* @arg filter `object`
|
|
156
|
-
*/
|
|
157
|
-
addFilter: function (filter) {
|
|
158
|
-
this.drawerOpen = true
|
|
159
|
-
filter.AND = true // When we add a filter external, it is currently only with an AND boolean
|
|
160
|
-
|
|
161
|
-
// Because refs are in v-for, nextTick is needed here
|
|
162
|
-
this.$nextTick(() => {
|
|
163
|
-
this.$refs[this.activeId][0].addFilter(filter)
|
|
164
|
-
})
|
|
165
|
-
},
|
|
166
|
-
openNeuronSearch: function (neuron) {
|
|
167
|
-
this.drawerOpen = true
|
|
168
|
-
// Because refs are in v-for, nextTick is needed here
|
|
169
|
-
this.$nextTick(() => {
|
|
170
|
-
this.$refs[this.activeId][0].openSearch(
|
|
171
|
-
'',
|
|
172
|
-
undefined,
|
|
173
|
-
'scicrunch-query-string/',
|
|
174
|
-
{ field: '*organ.curie', curie: neuron }
|
|
175
|
-
)
|
|
176
|
-
})
|
|
177
|
-
},
|
|
178
|
-
getAlgoliaFacets: async function () {
|
|
179
|
-
return await this.$refs[this.activeId][0].getAlgoliaFacets()
|
|
180
|
-
},
|
|
181
|
-
setDrawerOpen: function (value = true) {
|
|
182
|
-
this.drawerOpen = value
|
|
183
|
-
},
|
|
184
|
-
/**
|
|
185
|
-
* @vuese
|
|
186
|
-
* The function to emit 'tabClicked' event with tab's `id` when user clicks the sidebar tab.
|
|
187
|
-
* @arg id
|
|
188
|
-
*/
|
|
189
|
-
tabClicked: function (id) {
|
|
190
|
-
/**
|
|
191
|
-
* This event is emitted when user click sidebar's tab.
|
|
192
|
-
* @arg id
|
|
193
|
-
*/
|
|
194
|
-
this.$emit('tabClicked', id)
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
created: function () {
|
|
198
|
-
this.drawerOpen = this.openAtStart
|
|
199
|
-
},
|
|
200
|
-
mounted: function () {
|
|
201
|
-
EventBus.on('PopoverActionClick', (payLoad) => {
|
|
202
|
-
/**
|
|
203
|
-
* This event is emitted when the image is clicked on or the button below the image is clicked on.
|
|
204
|
-
* @arg payLoad
|
|
205
|
-
*/
|
|
206
|
-
this.$emit('actionClick', payLoad)
|
|
207
|
-
})
|
|
208
|
-
EventBus.on('
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
*
|
|
218
|
-
* @arg payload
|
|
219
|
-
*/
|
|
220
|
-
this.$emit('
|
|
221
|
-
})
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
* when the
|
|
226
|
-
*
|
|
227
|
-
* @arg payload
|
|
228
|
-
*/
|
|
229
|
-
this.$emit('
|
|
230
|
-
})
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
:
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
:
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
--el-
|
|
335
|
-
--el-
|
|
336
|
-
--el-
|
|
337
|
-
|
|
338
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="container">
|
|
3
|
+
<div v-if="!drawerOpen" @click="toggleDrawer" class="open-tab">
|
|
4
|
+
<el-icon><el-icon-arrow-left /></el-icon>
|
|
5
|
+
</div>
|
|
6
|
+
<el-drawer
|
|
7
|
+
class="side-bar my-drawer"
|
|
8
|
+
v-model="drawerOpen"
|
|
9
|
+
:teleported="false"
|
|
10
|
+
:modal-append-to-body="false"
|
|
11
|
+
size="584"
|
|
12
|
+
:with-header="false"
|
|
13
|
+
:wrapperClosable="false"
|
|
14
|
+
:modal="false"
|
|
15
|
+
modal-class="sidebar-body"
|
|
16
|
+
:z-index="10"
|
|
17
|
+
:lock-scroll="false"
|
|
18
|
+
>
|
|
19
|
+
<div class="box-card">
|
|
20
|
+
<div v-if="drawerOpen" @click="close" class="close-tab">
|
|
21
|
+
<el-icon><el-icon-arrow-right /></el-icon>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="sidebar-container">
|
|
24
|
+
<Tabs
|
|
25
|
+
v-if="tabs.length > 1"
|
|
26
|
+
:tabTitles="tabs"
|
|
27
|
+
:activeId="activeId"
|
|
28
|
+
@titleClicked="tabClicked"
|
|
29
|
+
/>
|
|
30
|
+
<template v-for="tab in tabs" key="tab.id">
|
|
31
|
+
<SidebarContent
|
|
32
|
+
class="sidebar-content-container"
|
|
33
|
+
v-show="tab.id === activeId"
|
|
34
|
+
:contextCardEntry="tab.contextCard"
|
|
35
|
+
:envVars="envVars"
|
|
36
|
+
:ref="tab.id"
|
|
37
|
+
@search-changed="searchChanged(tab.id, $event)"
|
|
38
|
+
@hover-changed="hoverChanged($event)"
|
|
39
|
+
/>
|
|
40
|
+
</template>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</el-drawer>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
import {
|
|
49
|
+
ArrowLeft as ElIconArrowLeft,
|
|
50
|
+
ArrowRight as ElIconArrowRight,
|
|
51
|
+
} from '@element-plus/icons-vue'
|
|
52
|
+
/* eslint-disable no-alert, no-console */
|
|
53
|
+
import { ElDrawer as Drawer, ElIcon as Icon } from 'element-plus'
|
|
54
|
+
import SidebarContent from './SidebarContent.vue'
|
|
55
|
+
import EventBus from './EventBus.js'
|
|
56
|
+
import Tabs from './Tabs.vue'
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Aims to provide a sidebar for searching capability for SPARC portal.
|
|
60
|
+
*/
|
|
61
|
+
export default {
|
|
62
|
+
components: {
|
|
63
|
+
SidebarContent,
|
|
64
|
+
Tabs,
|
|
65
|
+
ElIconArrowLeft,
|
|
66
|
+
ElIconArrowRight,
|
|
67
|
+
Drawer,
|
|
68
|
+
Icon
|
|
69
|
+
},
|
|
70
|
+
name: 'SideBar',
|
|
71
|
+
props: {
|
|
72
|
+
/**
|
|
73
|
+
* The option to show side bar.
|
|
74
|
+
*/
|
|
75
|
+
visible: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false,
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* The environment variables object with
|
|
81
|
+
* `API_LOCATION`, `ALGOLIA_KEY`, `ALGOLIA_ID`,
|
|
82
|
+
* `ALGOLIA_INDEX`, `PENNSIEVE_API_LOCATION`, `BL_SERVER_URL`,
|
|
83
|
+
* `NL_LINK_PREFIX`, `ROOT_URL`
|
|
84
|
+
*/
|
|
85
|
+
envVars: {
|
|
86
|
+
type: Object,
|
|
87
|
+
default: () => {},
|
|
88
|
+
},
|
|
89
|
+
/**
|
|
90
|
+
* The array of objects to show multiple sidebar contents.
|
|
91
|
+
*/
|
|
92
|
+
tabs: {
|
|
93
|
+
type: Array,
|
|
94
|
+
default: () => [{ title: 'flatmap', id: 1 }],
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* The active tab id for default tab.
|
|
98
|
+
*/
|
|
99
|
+
activeId: {
|
|
100
|
+
type: Number,
|
|
101
|
+
default: 1,
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* The option to show or hide sidebar on page load.
|
|
105
|
+
*/
|
|
106
|
+
openAtStart: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: false,
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
data: function () {
|
|
112
|
+
return {
|
|
113
|
+
drawerOpen: false,
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
methods: {
|
|
117
|
+
/**
|
|
118
|
+
* This event is emitted when the mouse hover are changed.
|
|
119
|
+
* @arg data
|
|
120
|
+
*/
|
|
121
|
+
hoverChanged: function (data) {
|
|
122
|
+
this.$emit('hover-changed', data)
|
|
123
|
+
},
|
|
124
|
+
/**
|
|
125
|
+
* This event is emitted when the search filters are changed.
|
|
126
|
+
* @arg `obj` {data, id}
|
|
127
|
+
*/
|
|
128
|
+
searchChanged: function (id, data) {
|
|
129
|
+
this.$emit('search-changed', { ...data, id: id })
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* @vuese
|
|
133
|
+
* The function to close sidebar.
|
|
134
|
+
*/
|
|
135
|
+
close: function () {
|
|
136
|
+
this.drawerOpen = false
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* @vuese
|
|
140
|
+
* The function to toggle (open and close) sidebar.
|
|
141
|
+
*/
|
|
142
|
+
toggleDrawer: function () {
|
|
143
|
+
this.drawerOpen = !this.drawerOpen
|
|
144
|
+
},
|
|
145
|
+
openSearch: function (facets, query) {
|
|
146
|
+
this.drawerOpen = true
|
|
147
|
+
// Because refs are in v-for, nextTick is needed here
|
|
148
|
+
this.$nextTick(() => {
|
|
149
|
+
this.$refs[this.activeId][0].openSearch(facets, query)
|
|
150
|
+
})
|
|
151
|
+
},
|
|
152
|
+
/**
|
|
153
|
+
* @vuese
|
|
154
|
+
* The function to add filters to sidebar search.
|
|
155
|
+
* @arg filter `object`
|
|
156
|
+
*/
|
|
157
|
+
addFilter: function (filter) {
|
|
158
|
+
this.drawerOpen = true
|
|
159
|
+
filter.AND = true // When we add a filter external, it is currently only with an AND boolean
|
|
160
|
+
|
|
161
|
+
// Because refs are in v-for, nextTick is needed here
|
|
162
|
+
this.$nextTick(() => {
|
|
163
|
+
this.$refs[this.activeId][0].addFilter(filter)
|
|
164
|
+
})
|
|
165
|
+
},
|
|
166
|
+
openNeuronSearch: function (neuron) {
|
|
167
|
+
this.drawerOpen = true
|
|
168
|
+
// Because refs are in v-for, nextTick is needed here
|
|
169
|
+
this.$nextTick(() => {
|
|
170
|
+
this.$refs[this.activeId][0].openSearch(
|
|
171
|
+
'',
|
|
172
|
+
undefined,
|
|
173
|
+
'scicrunch-query-string/',
|
|
174
|
+
{ field: '*organ.curie', curie: neuron }
|
|
175
|
+
)
|
|
176
|
+
})
|
|
177
|
+
},
|
|
178
|
+
getAlgoliaFacets: async function () {
|
|
179
|
+
return await this.$refs[this.activeId][0].getAlgoliaFacets()
|
|
180
|
+
},
|
|
181
|
+
setDrawerOpen: function (value = true) {
|
|
182
|
+
this.drawerOpen = value
|
|
183
|
+
},
|
|
184
|
+
/**
|
|
185
|
+
* @vuese
|
|
186
|
+
* The function to emit 'tabClicked' event with tab's `id` when user clicks the sidebar tab.
|
|
187
|
+
* @arg id
|
|
188
|
+
*/
|
|
189
|
+
tabClicked: function (id) {
|
|
190
|
+
/**
|
|
191
|
+
* This event is emitted when user click sidebar's tab.
|
|
192
|
+
* @arg id
|
|
193
|
+
*/
|
|
194
|
+
this.$emit('tabClicked', id)
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
created: function () {
|
|
198
|
+
this.drawerOpen = this.openAtStart
|
|
199
|
+
},
|
|
200
|
+
mounted: function () {
|
|
201
|
+
EventBus.on('PopoverActionClick', (payLoad) => {
|
|
202
|
+
/**
|
|
203
|
+
* This event is emitted when the image is clicked on or the button below the image is clicked on.
|
|
204
|
+
* @arg payLoad
|
|
205
|
+
*/
|
|
206
|
+
this.$emit('actionClick', payLoad)
|
|
207
|
+
})
|
|
208
|
+
EventBus.on('number-of-datasets-for-anatomies', (payLoad) => {
|
|
209
|
+
/**
|
|
210
|
+
* This emits a object with keys as anatomy and values as number of datasets for that anatomy.
|
|
211
|
+
* @arg payload
|
|
212
|
+
*/
|
|
213
|
+
this.$emit('number-of-datasets-for-anatomies', payLoad)
|
|
214
|
+
})
|
|
215
|
+
EventBus.on('anatomy-in-datasets', (payLoad) => {
|
|
216
|
+
/**
|
|
217
|
+
* This emits a lis of datasets, with the anatomy for each one. Used by flatmap for markers
|
|
218
|
+
* @arg payload
|
|
219
|
+
*/
|
|
220
|
+
this.$emit('anatomy-in-datasets', payLoad)
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
EventBus.on('contextUpdate', (payLoad) => {
|
|
224
|
+
/**
|
|
225
|
+
* This event is emitted when the context card is updated.
|
|
226
|
+
* Example, context card update on first load.
|
|
227
|
+
* @arg payload
|
|
228
|
+
*/
|
|
229
|
+
this.$emit('contextUpdate', payLoad)
|
|
230
|
+
})
|
|
231
|
+
EventBus.on('datalink-clicked', (payLoad) => {
|
|
232
|
+
/**
|
|
233
|
+
* This event is emitted
|
|
234
|
+
* when the dataset button or dataset image thumbnail
|
|
235
|
+
* from the gallery component is clicked.
|
|
236
|
+
* @arg payload
|
|
237
|
+
*/
|
|
238
|
+
this.$emit('datalink-clicked', payLoad);
|
|
239
|
+
})
|
|
240
|
+
},
|
|
241
|
+
}
|
|
242
|
+
</script>
|
|
243
|
+
|
|
244
|
+
<style lang="scss" scoped>
|
|
245
|
+
.box-card {
|
|
246
|
+
flex: 3;
|
|
247
|
+
height: 100%;
|
|
248
|
+
overflow: hidden;
|
|
249
|
+
pointer-events: auto;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.side-bar {
|
|
253
|
+
position: relative;
|
|
254
|
+
height: 100%;
|
|
255
|
+
pointer-events: none;
|
|
256
|
+
width:600px;
|
|
257
|
+
float: right;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
:deep(.sidebar-body) {
|
|
261
|
+
position: absolute !important;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.side-bar :deep(.el-drawer:focus) {
|
|
265
|
+
outline: none;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.sidebar-container {
|
|
269
|
+
height: 100%;
|
|
270
|
+
flex-flow: column;
|
|
271
|
+
display: flex;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.open-tab {
|
|
275
|
+
width: 20px;
|
|
276
|
+
height: 40px;
|
|
277
|
+
z-index: 8;
|
|
278
|
+
position: absolute;
|
|
279
|
+
top: calc(50vh - 80px);
|
|
280
|
+
right: 0px;
|
|
281
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
|
|
282
|
+
border: solid 1px $app-primary-color;
|
|
283
|
+
background-color: #f9f2fc;
|
|
284
|
+
text-align: center;
|
|
285
|
+
vertical-align: middle;
|
|
286
|
+
cursor: pointer;
|
|
287
|
+
pointer-events: auto;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.el-icon svg {
|
|
291
|
+
font-weight: 600;
|
|
292
|
+
margin-top: 24px;
|
|
293
|
+
color: $app-primary-color;
|
|
294
|
+
cursor: pointer;
|
|
295
|
+
pointer-events: auto;
|
|
296
|
+
transform: scaleY(2);
|
|
297
|
+
text-align: center;
|
|
298
|
+
vertical-align: middle;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.close-tab {
|
|
302
|
+
float: left;
|
|
303
|
+
flex: 1;
|
|
304
|
+
width: 20px;
|
|
305
|
+
height: 40px;
|
|
306
|
+
z-index: 8;
|
|
307
|
+
margin-top: calc(50vh - 80px);
|
|
308
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
|
|
309
|
+
border: solid 1px $app-primary-color;
|
|
310
|
+
background-color: #f9f2fc;
|
|
311
|
+
text-align: center;
|
|
312
|
+
vertical-align: middle;
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
pointer-events: auto;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
:deep(.my-drawer) {
|
|
318
|
+
background: rgba(0, 0, 0, 0);
|
|
319
|
+
box-shadow: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
:deep(.my-drawer .el-drawer__body) {
|
|
323
|
+
height: 100%;
|
|
324
|
+
padding: 0;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.sidebar-content-container {
|
|
328
|
+
flex: 1 1 auto;
|
|
329
|
+
}
|
|
330
|
+
</style>
|
|
331
|
+
|
|
332
|
+
<style lang="scss">
|
|
333
|
+
.side-bar {
|
|
334
|
+
--el-color-primary: #8300BF;
|
|
335
|
+
--el-color-primary-light-7: #DAB3EC;
|
|
336
|
+
--el-color-primary-light-8: #e6ccf2;
|
|
337
|
+
--el-color-primary-light-9: #f3e6f9;
|
|
338
|
+
--el-color-primary-light-3: #f3e6f9;
|
|
339
|
+
--el-color-primary-dark-2: #7600AC;
|
|
340
|
+
}
|
|
341
|
+
.el-button--primary {
|
|
342
|
+
--el-button-hover-text-color: var(--el-color-primary);
|
|
343
|
+
--el-button-hover-link-text-color: var(--el-color-primary-light-5);
|
|
344
|
+
--el-button-hover-bg-color: var(--el-color-primary-light-3);
|
|
345
|
+
--el-button-hover-border-color: var(--el-color-primary-light-3);
|
|
346
|
+
}
|
|
347
|
+
</style>
|