@abi-software/map-side-bar 2.3.1 → 2.4.0-alpha-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.
- package/.eslintrc.js +12 -12
- package/.postcssrc.json +5 -5
- package/LICENSE +201 -201
- package/README.md +168 -168
- package/cypress.config.js +23 -23
- package/dist/data/pmr-sample.json +3181 -0
- package/dist/map-side-bar.js +15142 -9024
- package/dist/map-side-bar.umd.cjs +50 -103
- package/dist/style.css +1 -1
- package/package.json +77 -77
- package/public/data/pmr-sample.json +3181 -0
- package/reporter-config.json +9 -9
- package/src/App.vue +266 -265
- package/src/algolia/algolia.js +255 -242
- package/src/algolia/utils.js +100 -100
- package/src/assets/_variables.scss +43 -43
- package/src/assets/styles.scss +6 -6
- package/src/components/BadgesGroup.vue +124 -124
- package/src/components/ConnectivityInfo.vue +619 -619
- package/src/components/DatasetCard.vue +367 -357
- package/src/components/EventBus.js +3 -3
- package/src/components/ExternalResourceCard.vue +113 -113
- package/src/components/FlatmapDatasetCard.vue +171 -0
- package/src/components/ImageGallery.vue +542 -542
- package/src/components/PMRDatasetCard.vue +237 -0
- package/src/components/SearchFilters.vue +1023 -1006
- package/src/components/SearchHistory.vue +175 -175
- package/src/components/SideBar.vue +436 -436
- package/src/components/SidebarContent.vue +730 -603
- package/src/components/Tabs.vue +145 -145
- package/src/components/allPaths.js +5928 -0
- package/src/components/index.js +8 -8
- package/src/components/pmrTest.js +4 -0
- package/src/components/species-map.js +8 -8
- package/src/components.d.ts +2 -0
- package/src/exampleConnectivityInput.js +291 -291
- package/src/flatmapQueries/flatmapQueries.js +169 -0
- package/src/main.js +9 -9
- package/src/mixins/S3Bucket.vue +37 -37
- package/src/mixins/mixedPageCalculation.vue +78 -0
- package/static.json +6 -6
- package/vite.config.js +55 -55
- package/vuese-generator.js +65 -65
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="dataset-card-container" ref="container">
|
|
3
|
+
<div class="dataset-card" ref="card">
|
|
4
|
+
<div class="seperator-path"></div>
|
|
5
|
+
<div v-loading="loading" class="card" >
|
|
6
|
+
<span class="card-left">
|
|
7
|
+
<a class="card-image-container" :href="entry.exposure" target="_blank">
|
|
8
|
+
<img
|
|
9
|
+
class="card-image"
|
|
10
|
+
:src="thumbnail"
|
|
11
|
+
width="210"
|
|
12
|
+
height="210"
|
|
13
|
+
:alt="entry.title"
|
|
14
|
+
loading="lazy"
|
|
15
|
+
/>
|
|
16
|
+
</a>
|
|
17
|
+
</span>
|
|
18
|
+
<div class="card-right">
|
|
19
|
+
<el-tag type="primary" class="source-tag">PMR</el-tag>
|
|
20
|
+
<div>
|
|
21
|
+
<h4 class="title">{{ entry.title }}</h4>
|
|
22
|
+
<div class="authors">
|
|
23
|
+
<em>{{ entry.authors }}</em>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<p v-if="entry.description">{{ entry.description }}</p>
|
|
27
|
+
<div>
|
|
28
|
+
<a :href="entry.exposure" target="_blank" class="el-button button">
|
|
29
|
+
Exposure
|
|
30
|
+
</a>
|
|
31
|
+
<a v-if="entry.omex" :href="entry.omex" target="_blank" class="el-button">
|
|
32
|
+
OMEX archive
|
|
33
|
+
</a>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
/* eslint-disable no-alert, no-console */
|
|
44
|
+
import {
|
|
45
|
+
ElButton,
|
|
46
|
+
ElIcon,
|
|
47
|
+
ElTag
|
|
48
|
+
} from 'element-plus'
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Entry Object - Data types
|
|
52
|
+
* ---------------------------------------
|
|
53
|
+
"exposure"
|
|
54
|
+
type: String
|
|
55
|
+
description: The exposure URL
|
|
56
|
+
|
|
57
|
+
"title"
|
|
58
|
+
type: String
|
|
59
|
+
description: The title
|
|
60
|
+
|
|
61
|
+
"sha"
|
|
62
|
+
type: String
|
|
63
|
+
description:
|
|
64
|
+
|
|
65
|
+
"workspace"
|
|
66
|
+
type: String
|
|
67
|
+
description: The workspace URL
|
|
68
|
+
|
|
69
|
+
"omex"
|
|
70
|
+
type: String
|
|
71
|
+
description:
|
|
72
|
+
|
|
73
|
+
"image"
|
|
74
|
+
type: String
|
|
75
|
+
description: The image URL
|
|
76
|
+
|
|
77
|
+
"authors"
|
|
78
|
+
type: String
|
|
79
|
+
description: Comma separated values if more than one
|
|
80
|
+
|
|
81
|
+
"description"
|
|
82
|
+
type: String
|
|
83
|
+
description: The description
|
|
84
|
+
* ---------------------------------------
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
const placeholderThumbnail = 'assets/missing-image.svg';
|
|
88
|
+
|
|
89
|
+
export default {
|
|
90
|
+
name: "PMRDatasetCard",
|
|
91
|
+
components: {
|
|
92
|
+
ElButton,
|
|
93
|
+
ElIcon,
|
|
94
|
+
ElTag
|
|
95
|
+
},
|
|
96
|
+
props: {
|
|
97
|
+
/**
|
|
98
|
+
* Object containing information for
|
|
99
|
+
* the required viewing.
|
|
100
|
+
*/
|
|
101
|
+
entry: {
|
|
102
|
+
type: Object,
|
|
103
|
+
default: () => {}
|
|
104
|
+
},
|
|
105
|
+
envVars: {
|
|
106
|
+
type: Object,
|
|
107
|
+
default: () => {}
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
data: function () {
|
|
111
|
+
return {
|
|
112
|
+
thumbnail: this.entry.image || placeholderThumbnail,
|
|
113
|
+
loading: false,
|
|
114
|
+
};
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
120
|
+
<style scoped lang="scss">
|
|
121
|
+
|
|
122
|
+
.dataset-card-container {
|
|
123
|
+
padding: 0 1rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.dataset-card {
|
|
127
|
+
position: relative;
|
|
128
|
+
min-height:17rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.title {
|
|
132
|
+
font-family: Asap;
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
font-weight: bold;
|
|
135
|
+
font-stretch: normal;
|
|
136
|
+
font-style: normal;
|
|
137
|
+
line-height: 1.5;
|
|
138
|
+
letter-spacing: 1.05px;
|
|
139
|
+
color: #484848;
|
|
140
|
+
}
|
|
141
|
+
.card {
|
|
142
|
+
font-family: Asap;
|
|
143
|
+
padding-top: 18px;
|
|
144
|
+
position: relative;
|
|
145
|
+
display: flex;
|
|
146
|
+
gap: 1rem;
|
|
147
|
+
|
|
148
|
+
h4,
|
|
149
|
+
p {
|
|
150
|
+
margin: 0;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.card-left{
|
|
155
|
+
flex: 1;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.card-right {
|
|
159
|
+
flex: 1.3;
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
gap: 1rem;
|
|
163
|
+
min-height: 17rem;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.el-button {
|
|
167
|
+
font-family: Asap;
|
|
168
|
+
font-size: 14px;
|
|
169
|
+
font-weight: normal;
|
|
170
|
+
font-stretch: normal;
|
|
171
|
+
font-style: normal;
|
|
172
|
+
line-height: normal;
|
|
173
|
+
letter-spacing: normal;
|
|
174
|
+
text-decoration: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.button {
|
|
178
|
+
background-color: $app-primary-color;
|
|
179
|
+
border: $app-primary-color;
|
|
180
|
+
color: white;
|
|
181
|
+
box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0.25);
|
|
182
|
+
transition: all 0.3s ease;
|
|
183
|
+
|
|
184
|
+
&:hover,
|
|
185
|
+
&:focus {
|
|
186
|
+
color: white;
|
|
187
|
+
background-color: $app-primary-color;
|
|
188
|
+
outline: none;
|
|
189
|
+
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.card-image-container {
|
|
194
|
+
display: block;
|
|
195
|
+
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
|
|
196
|
+
transition: all 0.3s ease;
|
|
197
|
+
|
|
198
|
+
&:hover {
|
|
199
|
+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.card-image {
|
|
204
|
+
max-width: 100%;
|
|
205
|
+
height: auto;
|
|
206
|
+
object-fit: cover;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.source-tag {
|
|
210
|
+
margin-bottom: 0.75rem;
|
|
211
|
+
margin-right: 2rem;
|
|
212
|
+
position: absolute;
|
|
213
|
+
bottom: 0;
|
|
214
|
+
right: 0;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.authors {
|
|
218
|
+
margin-top: 0.5rem;
|
|
219
|
+
font-size: 12px;
|
|
220
|
+
color: #444;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.loading-icon {
|
|
224
|
+
z-index: 20;
|
|
225
|
+
width: 40px;
|
|
226
|
+
height: 40px;
|
|
227
|
+
left: 80px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.loading-icon ::v-deep(.el-loading-mask) {
|
|
231
|
+
background-color: rgba(117, 190, 218, 0.0) !important;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.loading-icon ::v-deep(.el-loading-spinner .path) {
|
|
235
|
+
stroke: $app-primary-color;
|
|
236
|
+
}
|
|
237
|
+
</style>
|