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