@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,43 +1,43 @@
|
|
|
1
|
-
// Primary colors
|
|
2
|
-
$purple: #8300BF;
|
|
3
|
-
$darkBlue: #24245B;
|
|
4
|
-
$grey: #303133;
|
|
5
|
-
|
|
6
|
-
// Secondary colors
|
|
7
|
-
$lightPurple: #BC00FC;
|
|
8
|
-
$blue: #0026FF;
|
|
9
|
-
|
|
10
|
-
// Status colors
|
|
11
|
-
$success: #5e9f69;
|
|
12
|
-
$warning: #FF8400;
|
|
13
|
-
$danger: #b51d09;
|
|
14
|
-
|
|
15
|
-
// Text colors
|
|
16
|
-
$neutralGrey: #616161;
|
|
17
|
-
$mediumGrey: #606266;
|
|
18
|
-
$lightGrey: #909399;
|
|
19
|
-
|
|
20
|
-
// Line colors
|
|
21
|
-
$lineColor1: #DCDFE6;
|
|
22
|
-
$lineColor2: #E4E7ED;
|
|
23
|
-
|
|
24
|
-
// Background colors
|
|
25
|
-
$background: #F5F7FA;
|
|
26
|
-
$cochlear: #FFFFFF;
|
|
27
|
-
|
|
28
|
-
//Search box colors
|
|
29
|
-
$darkGrey: #606266;
|
|
30
|
-
|
|
31
|
-
$app-primary-color: $purple;
|
|
32
|
-
$app-secondary-color: $darkBlue;
|
|
33
|
-
$text-color: $grey;
|
|
34
|
-
$input-text: $grey;
|
|
35
|
-
|
|
36
|
-
$system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
|
|
37
|
-
$font-family: 'Asap', sans-serif;
|
|
38
|
-
|
|
39
|
-
// Viewport Sizes
|
|
40
|
-
$viewport-sm: 20rem;
|
|
41
|
-
$viewport-md: 47rem;
|
|
42
|
-
$viewport-lg: 64rem;
|
|
43
|
-
$viewport-xlg: 120rem;
|
|
1
|
+
// Primary colors
|
|
2
|
+
$purple: #8300BF;
|
|
3
|
+
$darkBlue: #24245B;
|
|
4
|
+
$grey: #303133;
|
|
5
|
+
|
|
6
|
+
// Secondary colors
|
|
7
|
+
$lightPurple: #BC00FC;
|
|
8
|
+
$blue: #0026FF;
|
|
9
|
+
|
|
10
|
+
// Status colors
|
|
11
|
+
$success: #5e9f69;
|
|
12
|
+
$warning: #FF8400;
|
|
13
|
+
$danger: #b51d09;
|
|
14
|
+
|
|
15
|
+
// Text colors
|
|
16
|
+
$neutralGrey: #616161;
|
|
17
|
+
$mediumGrey: #606266;
|
|
18
|
+
$lightGrey: #909399;
|
|
19
|
+
|
|
20
|
+
// Line colors
|
|
21
|
+
$lineColor1: #DCDFE6;
|
|
22
|
+
$lineColor2: #E4E7ED;
|
|
23
|
+
|
|
24
|
+
// Background colors
|
|
25
|
+
$background: #F5F7FA;
|
|
26
|
+
$cochlear: #FFFFFF;
|
|
27
|
+
|
|
28
|
+
//Search box colors
|
|
29
|
+
$darkGrey: #606266;
|
|
30
|
+
|
|
31
|
+
$app-primary-color: $purple;
|
|
32
|
+
$app-secondary-color: $darkBlue;
|
|
33
|
+
$text-color: $grey;
|
|
34
|
+
$input-text: $grey;
|
|
35
|
+
|
|
36
|
+
$system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
|
|
37
|
+
$font-family: 'Asap', sans-serif;
|
|
38
|
+
|
|
39
|
+
// Viewport Sizes
|
|
40
|
+
$viewport-sm: 20rem;
|
|
41
|
+
$viewport-md: 47rem;
|
|
42
|
+
$viewport-lg: 64rem;
|
|
43
|
+
$viewport-xlg: 120rem;
|
package/src/assets/styles.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
|
|
2
|
-
|
|
3
|
-
@import '_variables';
|
|
4
|
-
|
|
5
|
-
/* icon font path, required */
|
|
6
|
-
$--color-primary: $app-primary-color !default;
|
|
1
|
+
@import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
|
|
2
|
+
|
|
3
|
+
@import '_variables';
|
|
4
|
+
|
|
5
|
+
/* icon font path, required */
|
|
6
|
+
$--color-primary: $app-primary-color !default;
|
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="categories['All'].size > 1" class="container" ref="container">
|
|
3
|
-
<div>View data types:</div>
|
|
4
|
-
<template v-for="(item, key) in categories">
|
|
5
|
-
<el-button
|
|
6
|
-
v-if="item.size > 0"
|
|
7
|
-
:class="[{ active: key == active }, 'tag-button']"
|
|
8
|
-
@click="categoryClicked(key)"
|
|
9
|
-
size="small"
|
|
10
|
-
:key="key"
|
|
11
|
-
>{{ key + ' (' + item.size + ')' }}
|
|
12
|
-
</el-button>
|
|
13
|
-
</template>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
/* eslint-disable no-alert, no-console */
|
|
19
|
-
import { ElButton as Button } from 'element-plus'
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
name: 'BadgesGroup',
|
|
23
|
-
components: { Button },
|
|
24
|
-
props: {
|
|
25
|
-
/**
|
|
26
|
-
* Object containing information for
|
|
27
|
-
* the required viewing.
|
|
28
|
-
*/
|
|
29
|
-
additionalLinks: {
|
|
30
|
-
type: Array,
|
|
31
|
-
default: () => {
|
|
32
|
-
return []
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
datasetBiolucida: {
|
|
36
|
-
type: Object,
|
|
37
|
-
default: () => {
|
|
38
|
-
return {}
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
entry: {
|
|
42
|
-
type: Object,
|
|
43
|
-
default: () => {
|
|
44
|
-
return {}
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
data: function () {
|
|
49
|
-
return {
|
|
50
|
-
//Always start with 1 image - the dataset thumbnail itself
|
|
51
|
-
categories: { All: { size: 1 }, Dataset: { size: 1 } },
|
|
52
|
-
active: 'All',
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
methods: {
|
|
56
|
-
addToCategories: function (array, name) {
|
|
57
|
-
if (array && array.length > 0) {
|
|
58
|
-
this.categories[name] = { size: array.length }
|
|
59
|
-
this.categories['All'].size += array.length
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
addSimulationsToCategories: function (array) {
|
|
63
|
-
if (array && array.length > 0) {
|
|
64
|
-
const size = 1
|
|
65
|
-
this.categories['Simulations'] = { size }
|
|
66
|
-
this.categories['All'].size += size
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
categoryClicked: function (name) {
|
|
70
|
-
this.active = name
|
|
71
|
-
this.$emit('categoryChanged', name)
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
watch: {
|
|
75
|
-
datasetBiolucida: {
|
|
76
|
-
deep: true,
|
|
77
|
-
immediate: true,
|
|
78
|
-
handler: function (biolucidaData) {
|
|
79
|
-
if ('dataset_images' in biolucidaData) {
|
|
80
|
-
this.addToCategories(biolucidaData['dataset_images'], 'Images')
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
entry: {
|
|
85
|
-
deep: true,
|
|
86
|
-
immediate: true,
|
|
87
|
-
handler: function () {
|
|
88
|
-
this.addToCategories(this.entry.scaffolds, 'Scaffolds')
|
|
89
|
-
this.addToCategories(this.entry.segmentation, 'Segmentations')
|
|
90
|
-
this.addToCategories(this.entry.plots, 'Plots')
|
|
91
|
-
this.addSimulationsToCategories(this.entry.simulation)
|
|
92
|
-
/** disable the following
|
|
93
|
-
this.addToCategories(this.entry.images, 'Images');
|
|
94
|
-
this.addToCategories(this.entry.videos, 'Videos');
|
|
95
|
-
**/
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
}
|
|
100
|
-
</script>
|
|
101
|
-
|
|
102
|
-
<style lang="scss" scoped>
|
|
103
|
-
.container {
|
|
104
|
-
.tag-button.el-button {
|
|
105
|
-
border-radius: 4px!important;
|
|
106
|
-
font-size: 0.75rem!important;
|
|
107
|
-
padding: 0.2rem 0.2rem!important;
|
|
108
|
-
margin: 0.5rem 0 0 0!important;
|
|
109
|
-
margin-right: 0.75rem !important;
|
|
110
|
-
background: #f9f2fc!important;
|
|
111
|
-
border: 1px solid $app-primary-color!important;
|
|
112
|
-
color: $app-primary-color!important;
|
|
113
|
-
&.active {
|
|
114
|
-
background: $app-primary-color!important;
|
|
115
|
-
border: 1px solid $app-primary-color!important;
|
|
116
|
-
color: #fff!important;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.tag-button + .tag-button {
|
|
121
|
-
margin-left: 0!important;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="categories['All'].size > 1" class="container" ref="container">
|
|
3
|
+
<div>View data types:</div>
|
|
4
|
+
<template v-for="(item, key) in categories">
|
|
5
|
+
<el-button
|
|
6
|
+
v-if="item.size > 0"
|
|
7
|
+
:class="[{ active: key == active }, 'tag-button']"
|
|
8
|
+
@click="categoryClicked(key)"
|
|
9
|
+
size="small"
|
|
10
|
+
:key="key"
|
|
11
|
+
>{{ key + ' (' + item.size + ')' }}
|
|
12
|
+
</el-button>
|
|
13
|
+
</template>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
/* eslint-disable no-alert, no-console */
|
|
19
|
+
import { ElButton as Button } from 'element-plus'
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: 'BadgesGroup',
|
|
23
|
+
components: { Button },
|
|
24
|
+
props: {
|
|
25
|
+
/**
|
|
26
|
+
* Object containing information for
|
|
27
|
+
* the required viewing.
|
|
28
|
+
*/
|
|
29
|
+
additionalLinks: {
|
|
30
|
+
type: Array,
|
|
31
|
+
default: () => {
|
|
32
|
+
return []
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
datasetBiolucida: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: () => {
|
|
38
|
+
return {}
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
entry: {
|
|
42
|
+
type: Object,
|
|
43
|
+
default: () => {
|
|
44
|
+
return {}
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
data: function () {
|
|
49
|
+
return {
|
|
50
|
+
//Always start with 1 image - the dataset thumbnail itself
|
|
51
|
+
categories: { All: { size: 1 }, Dataset: { size: 1 } },
|
|
52
|
+
active: 'All',
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
addToCategories: function (array, name) {
|
|
57
|
+
if (array && array.length > 0) {
|
|
58
|
+
this.categories[name] = { size: array.length }
|
|
59
|
+
this.categories['All'].size += array.length
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
addSimulationsToCategories: function (array) {
|
|
63
|
+
if (array && array.length > 0) {
|
|
64
|
+
const size = 1
|
|
65
|
+
this.categories['Simulations'] = { size }
|
|
66
|
+
this.categories['All'].size += size
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
categoryClicked: function (name) {
|
|
70
|
+
this.active = name
|
|
71
|
+
this.$emit('categoryChanged', name)
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
watch: {
|
|
75
|
+
datasetBiolucida: {
|
|
76
|
+
deep: true,
|
|
77
|
+
immediate: true,
|
|
78
|
+
handler: function (biolucidaData) {
|
|
79
|
+
if ('dataset_images' in biolucidaData) {
|
|
80
|
+
this.addToCategories(biolucidaData['dataset_images'], 'Images')
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
entry: {
|
|
85
|
+
deep: true,
|
|
86
|
+
immediate: true,
|
|
87
|
+
handler: function () {
|
|
88
|
+
this.addToCategories(this.entry.scaffolds, 'Scaffolds')
|
|
89
|
+
this.addToCategories(this.entry.segmentation, 'Segmentations')
|
|
90
|
+
this.addToCategories(this.entry.plots, 'Plots')
|
|
91
|
+
this.addSimulationsToCategories(this.entry.simulation)
|
|
92
|
+
/** disable the following
|
|
93
|
+
this.addToCategories(this.entry.images, 'Images');
|
|
94
|
+
this.addToCategories(this.entry.videos, 'Videos');
|
|
95
|
+
**/
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<style lang="scss" scoped>
|
|
103
|
+
.container {
|
|
104
|
+
.tag-button.el-button {
|
|
105
|
+
border-radius: 4px!important;
|
|
106
|
+
font-size: 0.75rem!important;
|
|
107
|
+
padding: 0.2rem 0.2rem!important;
|
|
108
|
+
margin: 0.5rem 0 0 0!important;
|
|
109
|
+
margin-right: 0.75rem !important;
|
|
110
|
+
background: #f9f2fc!important;
|
|
111
|
+
border: 1px solid $app-primary-color!important;
|
|
112
|
+
color: $app-primary-color!important;
|
|
113
|
+
&.active {
|
|
114
|
+
background: $app-primary-color!important;
|
|
115
|
+
border: 1px solid $app-primary-color!important;
|
|
116
|
+
color: #fff!important;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.tag-button + .tag-button {
|
|
121
|
+
margin-left: 0!important;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</style>
|