@abi-software/map-side-bar 2.12.4 → 2.13.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.
- package/README.md +0 -2
- package/dist/map-side-bar.js +6314 -6479
- package/dist/map-side-bar.umd.cjs +60 -60
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +0 -1
- package/src/components/BadgesGroup.vue +1 -17
- package/src/components/DatasetCard.vue +0 -30
- package/src/components/DatasetExplorer.vue +0 -1
- package/src/components/ImageGallery.vue +0 -93
- package/src/components/SideBar.vue +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/map-side-bar",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"./src/*": "./src/*"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@abi-software/gallery": "
|
|
46
|
+
"@abi-software/gallery": "1.3.0",
|
|
47
47
|
"@abi-software/map-utilities": "1.7.7",
|
|
48
48
|
"@abi-software/svg-sprite": "^1.0.2",
|
|
49
49
|
"@element-plus/icons-vue": "^2.3.1",
|
package/src/App.vue
CHANGED
|
@@ -134,7 +134,6 @@ export default {
|
|
|
134
134
|
ALGOLIA_INDEX: import.meta.env.VITE_APP_ALGOLIA_INDEX,
|
|
135
135
|
PENNSIEVE_API_LOCATION: import.meta.env.VITE_APP_PENNSIEVE_API_LOCATION,
|
|
136
136
|
BL_SERVER_URL: import.meta.env.VITE_APP_BL_SERVER_URL,
|
|
137
|
-
NL_LINK_PREFIX: import.meta.env.VITE_APP_NL_LINK_PREFIX,
|
|
138
137
|
ROOT_URL: import.meta.env.VITE_APP_ROOT_URL,
|
|
139
138
|
FLATMAPAPI_LOCATION: import.meta.env.VITE_FLATMAPAPI_LOCATION,
|
|
140
139
|
},
|
|
@@ -32,12 +32,6 @@ export default {
|
|
|
32
32
|
return []
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
-
datasetBiolucida: {
|
|
36
|
-
type: Object,
|
|
37
|
-
default: () => {
|
|
38
|
-
return {}
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
35
|
entry: {
|
|
42
36
|
type: Object,
|
|
43
37
|
default: () => {
|
|
@@ -72,15 +66,6 @@ export default {
|
|
|
72
66
|
},
|
|
73
67
|
},
|
|
74
68
|
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
69
|
entry: {
|
|
85
70
|
deep: true,
|
|
86
71
|
immediate: true,
|
|
@@ -88,7 +73,6 @@ export default {
|
|
|
88
73
|
this.addToCategories(this.entry.flatmaps, 'Flatmaps')
|
|
89
74
|
this.addToCategories(this.entry.plots, 'Plots')
|
|
90
75
|
this.addToCategories(this.entry.scaffolds, 'Scaffolds')
|
|
91
|
-
this.addToCategories(this.entry.segmentation, 'Segmentations')
|
|
92
76
|
this.addSimulationsToCategories(this.entry.simulation)
|
|
93
77
|
/** disable the following
|
|
94
78
|
this.addToCategories(this.entry.images, 'Images');
|
|
@@ -117,7 +101,7 @@ export default {
|
|
|
117
101
|
color: #fff!important;
|
|
118
102
|
}
|
|
119
103
|
}
|
|
120
|
-
|
|
104
|
+
|
|
121
105
|
.tag-button + .tag-button {
|
|
122
106
|
margin-left: 0!important;
|
|
123
107
|
}
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
:envVars="envVars"
|
|
13
13
|
:label="label"
|
|
14
14
|
:datasetThumbnail="thumbnail"
|
|
15
|
-
:dataset-biolucida="biolucidaData"
|
|
16
15
|
:category="currentCategory"
|
|
17
16
|
@card-clicked="galleryClicked"
|
|
18
17
|
@datalink-clicked="galleryDatalinkClicked"
|
|
@@ -42,7 +41,6 @@
|
|
|
42
41
|
<div class="badges-container">
|
|
43
42
|
<BadgesGroup
|
|
44
43
|
:entry="entry"
|
|
45
|
-
:dataset-biolucida="biolucidaData"
|
|
46
44
|
@categoryChanged="categoryChanged"
|
|
47
45
|
/>
|
|
48
46
|
</div>
|
|
@@ -60,7 +58,6 @@
|
|
|
60
58
|
<script>
|
|
61
59
|
/* eslint-disable no-alert, no-console */
|
|
62
60
|
import { View as ElIconView } from '@element-plus/icons-vue'
|
|
63
|
-
import { Base64 } from 'js-base64';
|
|
64
61
|
import BadgesGroup from './BadgesGroup.vue'
|
|
65
62
|
import {
|
|
66
63
|
ElButton as Button,
|
|
@@ -109,7 +106,6 @@ export default {
|
|
|
109
106
|
loading: true,
|
|
110
107
|
version: 1,
|
|
111
108
|
lastDoi: undefined,
|
|
112
|
-
biolucidaData: undefined,
|
|
113
109
|
currentCategory: 'All',
|
|
114
110
|
copyContent: '',
|
|
115
111
|
}
|
|
@@ -237,7 +233,6 @@ export default {
|
|
|
237
233
|
this.discoverId = data.id
|
|
238
234
|
this.version = data.version
|
|
239
235
|
this.dataLocation = `https://sparc.science/datasets/${data.id}?type=dataset`
|
|
240
|
-
this.getBiolucidaInfo()
|
|
241
236
|
this.loading = false
|
|
242
237
|
this.updateCopyContent();
|
|
243
238
|
})
|
|
@@ -252,31 +247,6 @@ export default {
|
|
|
252
247
|
lastName: function (fullName) {
|
|
253
248
|
return fullName.split(',')[0]
|
|
254
249
|
},
|
|
255
|
-
getBiolucidaInfo: function () {
|
|
256
|
-
const dataset_images = [];
|
|
257
|
-
const biolucida2DItems = 'biolucida-2d' in this.entry ? this.entry['biolucida-2d'] :[];
|
|
258
|
-
const biolucida3DItems = 'biolucida-3d' in this.entry ? this.entry['biolucida-3d'] :[];
|
|
259
|
-
// We use information from SciCrunch to create the sharelink
|
|
260
|
-
biolucida2DItems.concat(biolucida3DItems).forEach((bObject) => {
|
|
261
|
-
const image_id = bObject.biolucida?.identifier;
|
|
262
|
-
if (image_id) {
|
|
263
|
-
const sourcepkg_id = 'identifier' in bObject ? bObject['identifier'] : "";
|
|
264
|
-
// The encoded string is in the following format -
|
|
265
|
-
// ${image_id}-col-${collection_id}, collection id can be any valid collection id
|
|
266
|
-
// and 260 is used for now.
|
|
267
|
-
const code = encodeURIComponent(Base64.encode(`${image_id}-col-260`));
|
|
268
|
-
const share_link = `https://sparc.biolucida.net/image?c=${code}`
|
|
269
|
-
dataset_images.push({
|
|
270
|
-
share_link,
|
|
271
|
-
image_id,
|
|
272
|
-
sourcepkg_id,
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
if (dataset_images.length > 0) {
|
|
277
|
-
this.biolucidaData = { dataset_images };
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
250
|
updateCopyContent: function () {
|
|
281
251
|
const contentArray = [];
|
|
282
252
|
|
|
@@ -499,7 +499,6 @@ export default {
|
|
|
499
499
|
element['abi-contextual-information'].length > 0
|
|
500
500
|
? element['abi-contextual-information']
|
|
501
501
|
: undefined,
|
|
502
|
-
segmentation: element['mbf-segmentation'],
|
|
503
502
|
//omex format will be the preferred mimetype
|
|
504
503
|
simulation: element['abi-simulation-omex-file'] ? element['abi-simulation-omex-file'] : element['abi-simulation-file'],
|
|
505
504
|
flatmaps: element['abi-flatmap-file'],
|
|
@@ -40,12 +40,6 @@ export default {
|
|
|
40
40
|
components: { Gallery },
|
|
41
41
|
mixins: [GalleryHelper, S3Bucket],
|
|
42
42
|
props: {
|
|
43
|
-
datasetBiolucida: {
|
|
44
|
-
type: Object,
|
|
45
|
-
default: () => {
|
|
46
|
-
return {}
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
43
|
envVars: {
|
|
50
44
|
type: Object,
|
|
51
45
|
default: () => {},
|
|
@@ -89,13 +83,10 @@ export default {
|
|
|
89
83
|
ro: null,
|
|
90
84
|
maxWidth: 3,
|
|
91
85
|
items: {
|
|
92
|
-
//Use the Images instead for Biolucida Images
|
|
93
|
-
//"Biolucida Images": [],
|
|
94
86
|
Dataset: [],
|
|
95
87
|
Flatmaps:[],
|
|
96
88
|
Images: [],
|
|
97
89
|
Scaffolds: [],
|
|
98
|
-
Segmentations: [],
|
|
99
90
|
Simulations: [],
|
|
100
91
|
Videos: [],
|
|
101
92
|
Plots: [],
|
|
@@ -128,7 +119,6 @@ export default {
|
|
|
128
119
|
this.createScaffoldItems()
|
|
129
120
|
this.createSimulationItems()
|
|
130
121
|
this.createPlotItems()
|
|
131
|
-
this.createSegmentationItems()
|
|
132
122
|
/* Disable these two
|
|
133
123
|
this.createImageItems();
|
|
134
124
|
this.createVideoItems();
|
|
@@ -324,47 +314,6 @@ export default {
|
|
|
324
314
|
})
|
|
325
315
|
}
|
|
326
316
|
},
|
|
327
|
-
createSegmentationItems: function () {
|
|
328
|
-
if (this.entry.segmentation) {
|
|
329
|
-
this.entry.segmentation.forEach((segmentation) => {
|
|
330
|
-
const id = segmentation.id
|
|
331
|
-
let filePath = segmentation.dataset.path
|
|
332
|
-
filePath = filePath.replaceAll(' ', '_')
|
|
333
|
-
filePath = filePath.replaceAll(',', '_')
|
|
334
|
-
const prefix = this.envVars.NL_LINK_PREFIX
|
|
335
|
-
const resource = {
|
|
336
|
-
share_link: `${prefix}/dataviewer?datasetId=${this.datasetId}&version=${this.datasetVersion}&path=files/${filePath}`,
|
|
337
|
-
}
|
|
338
|
-
let action = {
|
|
339
|
-
label: capitalise(this.label),
|
|
340
|
-
resource: resource,
|
|
341
|
-
datasetId: this.datasetId,
|
|
342
|
-
s3uri: this.entry.s3uri,
|
|
343
|
-
title: 'View segmentation',
|
|
344
|
-
type: 'Segmentation',
|
|
345
|
-
}
|
|
346
|
-
const thumbnailURL = this.getSegmentationThumbnailURL(
|
|
347
|
-
this.envVars.API_LOCATION,
|
|
348
|
-
{
|
|
349
|
-
id,
|
|
350
|
-
datasetId: this.datasetId,
|
|
351
|
-
datasetVersion: this.datasetVersion,
|
|
352
|
-
segmentationFilePath: filePath,
|
|
353
|
-
s3Bucket: this.s3Bucket,
|
|
354
|
-
}
|
|
355
|
-
)
|
|
356
|
-
this.items['Segmentations'].push({
|
|
357
|
-
id,
|
|
358
|
-
title: baseName(filePath),
|
|
359
|
-
type: 'Segmentation',
|
|
360
|
-
thumbnail: thumbnailURL,
|
|
361
|
-
userData: action,
|
|
362
|
-
hideType: true,
|
|
363
|
-
mimetype: 'image/png',
|
|
364
|
-
})
|
|
365
|
-
})
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
317
|
createSimulationItems: function () {
|
|
369
318
|
if (this.entry.simulation) {
|
|
370
319
|
this.entry.simulation.forEach((simulation) => {
|
|
@@ -496,48 +445,6 @@ export default {
|
|
|
496
445
|
galleryItems: function () {
|
|
497
446
|
this.resetIndex = false
|
|
498
447
|
},
|
|
499
|
-
datasetBiolucida: {
|
|
500
|
-
deep: true,
|
|
501
|
-
immediate: true,
|
|
502
|
-
handler: function (biolucidaData) {
|
|
503
|
-
let items = []
|
|
504
|
-
if ('dataset_images' in biolucidaData) {
|
|
505
|
-
items.push(
|
|
506
|
-
...Array.from(biolucidaData.dataset_images, (dataset_image) => {
|
|
507
|
-
const thumbnailURL = this.getThumbnailURLFromBiolucida(
|
|
508
|
-
this.envVars.API_LOCATION,
|
|
509
|
-
{
|
|
510
|
-
id: dataset_image.image_id,
|
|
511
|
-
}
|
|
512
|
-
)
|
|
513
|
-
const resource = {
|
|
514
|
-
share_link: dataset_image.share_link,
|
|
515
|
-
id: dataset_image.image_id,
|
|
516
|
-
itemId: dataset_image.sourcepkg_id,
|
|
517
|
-
}
|
|
518
|
-
let action = {
|
|
519
|
-
label: capitalise(this.label),
|
|
520
|
-
resource: resource,
|
|
521
|
-
datasetId: this.datasetId,
|
|
522
|
-
title: 'View image',
|
|
523
|
-
name: capitalise(this.label),
|
|
524
|
-
type: 'Biolucida',
|
|
525
|
-
}
|
|
526
|
-
return {
|
|
527
|
-
id: dataset_image.image_id,
|
|
528
|
-
title: `Image`,
|
|
529
|
-
type: 'Image',
|
|
530
|
-
thumbnail: thumbnailURL,
|
|
531
|
-
userData: action,
|
|
532
|
-
mimetype: 'image/png',
|
|
533
|
-
hideType: true,
|
|
534
|
-
}
|
|
535
|
-
})
|
|
536
|
-
)
|
|
537
|
-
}
|
|
538
|
-
this.items['Images'] = items
|
|
539
|
-
},
|
|
540
|
-
},
|
|
541
448
|
},
|
|
542
449
|
mounted() {
|
|
543
450
|
this.ro = new ResizeObserver(this.onResize).observe(this.$el)
|
|
@@ -129,9 +129,8 @@ export default {
|
|
|
129
129
|
},
|
|
130
130
|
/**
|
|
131
131
|
* The environment variables object with
|
|
132
|
-
* `API_LOCATION`, `ALGOLIA_KEY`, `ALGOLIA_ID`,
|
|
133
|
-
* `
|
|
134
|
-
* `NL_LINK_PREFIX`, `ROOT_URL`
|
|
132
|
+
* `API_LOCATION`, `ALGOLIA_KEY`, `ALGOLIA_ID`, `ALGOLIA_INDEX`,
|
|
133
|
+
* `PENNSIEVE_API_LOCATION`, `BL_SERVER_URL`, `ROOT_URL`
|
|
135
134
|
*/
|
|
136
135
|
envVars: {
|
|
137
136
|
type: Object,
|