@abi-software/map-side-bar 2.16.0 → 2.18.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/dist/map-side-bar.js +28230 -26189
- package/dist/map-side-bar.umd.cjs +83 -92
- package/dist/style.css +2 -1
- package/eslint.config.js +23 -0
- package/package.json +44 -33
- package/src/App.vue +1 -4
- package/src/assets/fonts.scss +3 -0
- package/src/assets/pagination.scss +2 -1
- package/src/assets/searchPopover.scss +3 -0
- package/src/assets/styles.scss +2 -3
- package/src/components/ConnectivityCard.vue +1 -1
- package/src/components/ConnectivityExplorer.vue +2 -2
- package/src/components/ConnectivityInfo.vue +1 -1
- package/src/components/ContributorItem.vue +2 -2
- package/src/components/DatasetCard.vue +14 -5
- package/src/components/DatasetExplorer.vue +2 -2
- package/src/components/SearchFilters.vue +11 -28
- package/src/components/index.js +1 -0
- package/src/components.d.ts +6 -2
- package/src/main.js +1 -0
- package/vite.config.js +16 -5
- package/.eslintrc.js +0 -12
- package/static.json +0 -7
package/eslint.config.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import vue from "eslint-plugin-vue";
|
|
3
|
+
import globals from "globals";
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
ignores: ["dist/**", "docs/.vitepress/**", "docs/components/**"],
|
|
8
|
+
},
|
|
9
|
+
js.configs.recommended,
|
|
10
|
+
...vue.configs["flat/essential"],
|
|
11
|
+
{
|
|
12
|
+
files: ["**/*.{js,vue}"],
|
|
13
|
+
languageOptions: {
|
|
14
|
+
ecmaVersion: "latest",
|
|
15
|
+
sourceType: "module",
|
|
16
|
+
globals: {
|
|
17
|
+
...globals.node,
|
|
18
|
+
...globals.browser,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
rules: {},
|
|
22
|
+
},
|
|
23
|
+
];
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/map-side-bar",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": "
|
|
6
|
+
"node": "^24.20.0"
|
|
7
7
|
},
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"serve": "vite --host",
|
|
21
21
|
"build-bundle": "vite build",
|
|
22
22
|
"preview": "vite preview",
|
|
23
|
+
"lint": "eslint .",
|
|
23
24
|
"test": "cypress run --component",
|
|
24
25
|
"cypress:open": "cypress open",
|
|
25
26
|
"release:beta": "npm version prerelease --preid=beta; npm publish --tag beta",
|
|
@@ -46,45 +47,55 @@
|
|
|
46
47
|
"./src/*": "./src/*"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@abi-software/gallery": "1.
|
|
50
|
-
"@abi-software/map-utilities": "1.
|
|
51
|
-
"@abi-software/svg-sprite": "
|
|
52
|
-
"@element-plus/icons-vue": "^2.3.
|
|
53
|
-
"algoliasearch": "^4.
|
|
54
|
-
"element-plus": "2.
|
|
55
|
-
"js-base64": "^3.
|
|
56
|
-
"marked": "^
|
|
50
|
+
"@abi-software/gallery": "1.6.0",
|
|
51
|
+
"@abi-software/map-utilities": "1.11.0",
|
|
52
|
+
"@abi-software/svg-sprite": "1.4.0",
|
|
53
|
+
"@element-plus/icons-vue": "^2.3.2",
|
|
54
|
+
"algoliasearch": "^4.27.0",
|
|
55
|
+
"element-plus": "^2.14.5",
|
|
56
|
+
"js-base64": "^3.9.2",
|
|
57
|
+
"marked": "^8.0.1",
|
|
57
58
|
"mitt": "^3.0.1",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"xss": "^1.0.14"
|
|
59
|
+
"vue": "^3.5.41",
|
|
60
|
+
"xss": "^1.0.15"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
63
|
+
"@eslint/js": "^10.0.1",
|
|
64
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
65
|
+
"unplugin-vue-components": "^32.1.0",
|
|
66
|
+
"@vue/compiler-sfc": "^3.5.41",
|
|
65
67
|
"@vuese/markdown-render": "^2.11.3",
|
|
66
|
-
"auto-changelog": "^2.
|
|
67
|
-
"autoprefixer": "^10.4
|
|
68
|
-
"chokidar": "^
|
|
69
|
-
"concurrently": "^
|
|
70
|
-
"cypress": "^
|
|
71
|
-
"cypress-multi-reporters": "^
|
|
72
|
-
"cypress-wait-until": "^3.0.
|
|
73
|
-
"eslint": "^
|
|
74
|
-
"eslint-plugin-vue": "^
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
68
|
+
"auto-changelog": "^2.6.0",
|
|
69
|
+
"autoprefixer": "^10.5.4",
|
|
70
|
+
"chokidar": "^5.0.0",
|
|
71
|
+
"concurrently": "^9.2.4",
|
|
72
|
+
"cypress": "^15.21.0",
|
|
73
|
+
"cypress-multi-reporters": "^2.0.5",
|
|
74
|
+
"cypress-wait-until": "^3.0.2",
|
|
75
|
+
"eslint": "^10.9.1",
|
|
76
|
+
"eslint-plugin-vue": "^10.10.0",
|
|
77
|
+
"globals": "^17.11.0",
|
|
78
|
+
"mochawesome": "^8.0.1",
|
|
79
|
+
"raw-loader": "^4.0.2",
|
|
80
|
+
"sass": "^1.103.1",
|
|
78
81
|
"transform-loader": "^0.2.4",
|
|
79
|
-
"typescript": "^
|
|
80
|
-
"vite": "^
|
|
81
|
-
"vitepress": "^1.
|
|
82
|
+
"typescript": "^7.0.2",
|
|
83
|
+
"vite": "^8.2.1",
|
|
84
|
+
"vitepress": "^1.6.4",
|
|
82
85
|
"vue-custom-element": "^3.3.0",
|
|
83
86
|
"vue-docgen-api": "^4.79.2"
|
|
84
87
|
},
|
|
85
88
|
"optionalDependencies": {
|
|
86
|
-
"@
|
|
87
|
-
"@
|
|
88
|
-
"@rollup/rollup-
|
|
89
|
+
"@esbuild/darwin-arm64": "0.28.2",
|
|
90
|
+
"@esbuild/linux-x64": "0.28.2",
|
|
91
|
+
"@rollup/rollup-darwin-arm64": "4.63.0",
|
|
92
|
+
"@rollup/rollup-linux-x64-gnu": "4.63.0",
|
|
93
|
+
"@rollup/rollup-win32-x64-msvc": "4.63.0"
|
|
94
|
+
},
|
|
95
|
+
"allowScripts": {
|
|
96
|
+
"@parcel/watcher@2.6.0": true,
|
|
97
|
+
"cypress@15.21.1": true,
|
|
98
|
+
"fsevents@2.3.3": true,
|
|
99
|
+
"esbuild@0.21.5": true
|
|
89
100
|
}
|
|
90
101
|
}
|
package/src/App.vue
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app">
|
|
3
|
-
<link
|
|
4
|
-
rel="stylesheet"
|
|
5
|
-
href="https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap"
|
|
6
|
-
/>
|
|
7
3
|
<div class="options-container">
|
|
8
4
|
<div>Click arrow to open sidebar</div>
|
|
9
5
|
<el-button @click="openSearch">search Uberon from refs</el-button>
|
|
@@ -389,6 +385,7 @@ export default {
|
|
|
389
385
|
}
|
|
390
386
|
body {
|
|
391
387
|
margin: 0px;
|
|
388
|
+
font-family: $font-family;
|
|
392
389
|
}
|
|
393
390
|
.map-icon {
|
|
394
391
|
color: $app-primary-color;
|
package/src/assets/styles.scss
CHANGED
|
@@ -653,8 +653,8 @@ export default {
|
|
|
653
653
|
</script>
|
|
654
654
|
|
|
655
655
|
<style lang="scss" scoped>
|
|
656
|
-
@
|
|
657
|
-
@
|
|
656
|
+
@use '../assets/searchPopover.scss';
|
|
657
|
+
@use '../assets/pagination.scss';
|
|
658
658
|
|
|
659
659
|
.connectivity-card {
|
|
660
660
|
position: relative;
|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
59
|
<style lang="scss" scoped>
|
|
60
|
-
@
|
|
60
|
+
@use '../assets/_variables.scss';
|
|
61
61
|
|
|
62
62
|
.contributor-item {
|
|
63
63
|
display: inline;
|
|
@@ -67,7 +67,7 @@ export default {
|
|
|
67
67
|
</style>
|
|
68
68
|
|
|
69
69
|
<style lang="scss">
|
|
70
|
-
@
|
|
70
|
+
@use '../assets/_variables.scss';
|
|
71
71
|
|
|
72
72
|
.contributor-popover.el-popover {
|
|
73
73
|
font-family: $font-family;
|
|
@@ -217,6 +217,7 @@ export default {
|
|
|
217
217
|
},
|
|
218
218
|
createFlatmapItems: function () {
|
|
219
219
|
if (this.entry.flatmaps) {
|
|
220
|
+
const flatmaps = []
|
|
220
221
|
this.entry.flatmaps.forEach((flatmap) => {
|
|
221
222
|
if (flatmap.associated_flatmap?.identifier) {
|
|
222
223
|
const filePath = flatmap.dataset.path
|
|
@@ -245,7 +246,7 @@ export default {
|
|
|
245
246
|
doi: this.entry.doi,
|
|
246
247
|
version: this.version,
|
|
247
248
|
}
|
|
248
|
-
|
|
249
|
+
flatmaps.push({
|
|
249
250
|
id,
|
|
250
251
|
title: baseName(filePath),
|
|
251
252
|
type: 'Flatmap',
|
|
@@ -256,6 +257,7 @@ export default {
|
|
|
256
257
|
})
|
|
257
258
|
}
|
|
258
259
|
})
|
|
260
|
+
this.items['Flatmaps'].push(...flatmaps.sort((a, b) => a.title.localeCompare(b.title)))
|
|
259
261
|
}
|
|
260
262
|
},
|
|
261
263
|
createImageItems: function () {
|
|
@@ -276,6 +278,7 @@ export default {
|
|
|
276
278
|
},
|
|
277
279
|
createPlotItems: function () {
|
|
278
280
|
if (this.entry.plots) {
|
|
281
|
+
const plots = []
|
|
279
282
|
this.entry.plots.forEach((plot) => {
|
|
280
283
|
const filePath = plot.dataset.path
|
|
281
284
|
const id = plot.identifier
|
|
@@ -333,7 +336,7 @@ export default {
|
|
|
333
336
|
discoverId: this.discoverId,
|
|
334
337
|
version: this.version,
|
|
335
338
|
}
|
|
336
|
-
|
|
339
|
+
plots.push({
|
|
337
340
|
id,
|
|
338
341
|
title: baseName(filePath),
|
|
339
342
|
type: 'Plot',
|
|
@@ -343,11 +346,14 @@ export default {
|
|
|
343
346
|
mimetype,
|
|
344
347
|
})
|
|
345
348
|
})
|
|
349
|
+
this.items['Plots'].push(...plots.sort((a, b) => a.title.localeCompare(b.title)))
|
|
350
|
+
|
|
346
351
|
}
|
|
347
352
|
},
|
|
348
353
|
createScaffoldItems: function () {
|
|
349
354
|
if (this.entry.scaffolds) {
|
|
350
355
|
let index = 0
|
|
356
|
+
const scaffolds = []
|
|
351
357
|
this.entry.scaffolds.forEach((scaffold, i) => {
|
|
352
358
|
const filePath = scaffold.dataset.path
|
|
353
359
|
const id = scaffold.identifier
|
|
@@ -381,7 +387,7 @@ export default {
|
|
|
381
387
|
s3uri: this.entry.s3uri,
|
|
382
388
|
contextCardUrl: this.getContextCardUrl(i),
|
|
383
389
|
}
|
|
384
|
-
|
|
390
|
+
scaffolds.push({
|
|
385
391
|
id,
|
|
386
392
|
title: baseName(filePath),
|
|
387
393
|
type: 'Scaffold',
|
|
@@ -391,10 +397,12 @@ export default {
|
|
|
391
397
|
mimetype,
|
|
392
398
|
})
|
|
393
399
|
})
|
|
400
|
+
this.items['Scaffolds'].push(...scaffolds.sort((a, b) => a.title.localeCompare(b.title)))
|
|
394
401
|
}
|
|
395
402
|
},
|
|
396
403
|
createSimulationItems: function () {
|
|
397
404
|
if (this.entry.simulation) {
|
|
405
|
+
const simulations = []
|
|
398
406
|
this.entry.simulation.forEach((simulation) => {
|
|
399
407
|
if (simulation.additional_mimetype.name === "application/x.vnd.abi.simulation+json") {
|
|
400
408
|
let action = {
|
|
@@ -409,7 +417,7 @@ export default {
|
|
|
409
417
|
discoverId: this.discoverId,
|
|
410
418
|
dataset: `${this.envVars.ROOT_URL}/datasets/${this.discoverId}?type=dataset`,
|
|
411
419
|
}
|
|
412
|
-
|
|
420
|
+
simulations.push({
|
|
413
421
|
id: 'simulation',
|
|
414
422
|
title: ' ',
|
|
415
423
|
type: 'Simulation',
|
|
@@ -448,7 +456,7 @@ export default {
|
|
|
448
456
|
doi: this.entry.doi,
|
|
449
457
|
version: this.version,
|
|
450
458
|
}
|
|
451
|
-
|
|
459
|
+
simulations.push({
|
|
452
460
|
id,
|
|
453
461
|
title: baseName(filePath),
|
|
454
462
|
type: 'Simulation',
|
|
@@ -459,6 +467,7 @@ export default {
|
|
|
459
467
|
})
|
|
460
468
|
}
|
|
461
469
|
})
|
|
470
|
+
this.items['Simulations'].push(...simulations.sort((a, b) => a.title.localeCompare(b.title)))
|
|
462
471
|
}
|
|
463
472
|
},
|
|
464
473
|
createVideoItems: function () {
|
|
@@ -573,8 +573,8 @@ export default {
|
|
|
573
573
|
</script>
|
|
574
574
|
|
|
575
575
|
<style lang="scss" scoped>
|
|
576
|
-
@
|
|
577
|
-
@
|
|
576
|
+
@use '../assets/searchPopover.scss';
|
|
577
|
+
@use '../assets/pagination.scss';
|
|
578
578
|
|
|
579
579
|
.dataset-card {
|
|
580
580
|
position: relative;
|
|
@@ -208,6 +208,10 @@ export default {
|
|
|
208
208
|
showFiltersText: true,
|
|
209
209
|
cascadeSelected: [],
|
|
210
210
|
cascadeSelectedWithBoolean: [],
|
|
211
|
+
// Re-entrancy lock: el-cascader can echo an extra @change
|
|
212
|
+
// after we reassign cascadeSelected in setCascader;
|
|
213
|
+
// stays locked until the filterTimeout debounce below unlocks it.
|
|
214
|
+
cascadeEventLocked: false,
|
|
211
215
|
filterTimeout: null,
|
|
212
216
|
numberShown: 10,
|
|
213
217
|
filters: [],
|
|
@@ -258,7 +262,6 @@ export default {
|
|
|
258
262
|
if (this.options.length) {
|
|
259
263
|
this.checkShowAllBoxes()
|
|
260
264
|
// this.setCascader(this.entry.filterFacets)
|
|
261
|
-
this.cssMods()
|
|
262
265
|
this.$emit('cascaderReady')
|
|
263
266
|
}
|
|
264
267
|
})
|
|
@@ -570,6 +573,12 @@ export default {
|
|
|
570
573
|
},
|
|
571
574
|
// cascadeEvent: initiate searches based off cascader changes
|
|
572
575
|
cascadeEvent: function (eventIn) {
|
|
576
|
+
// Ignore the echoed @change el-cascader fires
|
|
577
|
+
// after we reassign cascadeSelected in setCascader
|
|
578
|
+
if (this.cascadeEventLocked) {
|
|
579
|
+
return
|
|
580
|
+
}
|
|
581
|
+
this.cascadeEventLocked = true
|
|
573
582
|
let event = [...eventIn]
|
|
574
583
|
if (event) {
|
|
575
584
|
// Check for show all in selected cascade options
|
|
@@ -667,7 +676,7 @@ export default {
|
|
|
667
676
|
|
|
668
677
|
this.filterTimeout = setTimeout(() => {
|
|
669
678
|
this.$emit('filterResults', filters) // emit filters for apps above sidebar
|
|
670
|
-
this.
|
|
679
|
+
this.cascadeEventLocked = false // safe to process real cascader changes again
|
|
671
680
|
}, 600);
|
|
672
681
|
}
|
|
673
682
|
},
|
|
@@ -775,7 +784,6 @@ export default {
|
|
|
775
784
|
this.updateListFilters(this.__expandItem__[0])
|
|
776
785
|
}
|
|
777
786
|
this.updateListStyleOrder()
|
|
778
|
-
this.cssMods()
|
|
779
787
|
},
|
|
780
788
|
updateListStyleOrder: function () {
|
|
781
789
|
this.$nextTick(() => {
|
|
@@ -954,30 +962,6 @@ export default {
|
|
|
954
962
|
})
|
|
955
963
|
)
|
|
956
964
|
},
|
|
957
|
-
makeCascadeLabelsClickable: function () {
|
|
958
|
-
// Next tick allows the cascader menu to change
|
|
959
|
-
this.$nextTick(() => {
|
|
960
|
-
document
|
|
961
|
-
.querySelectorAll('.sidebar-cascader-popper .el-cascader-node__label')
|
|
962
|
-
.forEach((el) => {
|
|
963
|
-
// step through each cascade label
|
|
964
|
-
el.onclick = function () {
|
|
965
|
-
const checkbox = this.previousElementSibling
|
|
966
|
-
if (checkbox) {
|
|
967
|
-
if (!checkbox.parentElement.attributes['aria-owns']) {
|
|
968
|
-
// check if we are at the lowest level of cascader
|
|
969
|
-
this.previousElementSibling.click() // Click the checkbox
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
})
|
|
974
|
-
})
|
|
975
|
-
},
|
|
976
|
-
|
|
977
|
-
cssMods: function () {
|
|
978
|
-
this.makeCascadeLabelsClickable()
|
|
979
|
-
},
|
|
980
|
-
|
|
981
965
|
flattenToFilters: function (filter, targetOption, previousMatched = false) {
|
|
982
966
|
let filtersArray = []
|
|
983
967
|
|
|
@@ -1142,7 +1126,6 @@ export default {
|
|
|
1142
1126
|
this.cascaderIsReady = true
|
|
1143
1127
|
this.checkShowAllBoxes()
|
|
1144
1128
|
this.setCascader(this.entry.filterFacets)
|
|
1145
|
-
this.cssMods()
|
|
1146
1129
|
this.$emit('cascaderReady')
|
|
1147
1130
|
})
|
|
1148
1131
|
},
|
package/src/components/index.js
CHANGED
package/src/components.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
2
|
// @ts-nocheck
|
|
3
|
+
// biome-ignore lint: disable
|
|
4
|
+
// oxlint-disable
|
|
5
|
+
// ------
|
|
4
6
|
// Generated by unplugin-vue-components
|
|
5
7
|
// Read more: https://github.com/vuejs/core/pull/3399
|
|
8
|
+
|
|
6
9
|
export {}
|
|
7
10
|
|
|
11
|
+
/* prettier-ignore */
|
|
8
12
|
declare module 'vue' {
|
|
9
13
|
export interface GlobalComponents {
|
|
10
14
|
AnnotationTool: typeof import('./components/AnnotationTool.vue')['default']
|
|
@@ -50,7 +54,7 @@ declare module 'vue' {
|
|
|
50
54
|
SideBar: typeof import('./components/SideBar.vue')['default']
|
|
51
55
|
Tabs: typeof import('./components/Tabs.vue')['default']
|
|
52
56
|
}
|
|
53
|
-
export interface
|
|
57
|
+
export interface GlobalDirectives {
|
|
54
58
|
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
|
|
55
59
|
}
|
|
56
60
|
}
|
package/src/main.js
CHANGED
package/vite.config.js
CHANGED
|
@@ -28,31 +28,42 @@ export default defineConfig({
|
|
|
28
28
|
],
|
|
29
29
|
resolve: {
|
|
30
30
|
alias: {
|
|
31
|
-
'@': resolve(
|
|
31
|
+
'@': resolve(import.meta.dirname, './src'),
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
build: {
|
|
35
35
|
lib: {
|
|
36
|
-
entry: resolve(
|
|
36
|
+
entry: resolve(import.meta.dirname, "./src/components/index.js"),
|
|
37
37
|
name: "MapSideBar",
|
|
38
38
|
fileName: 'map-side-bar',
|
|
39
39
|
},
|
|
40
40
|
rollupOptions: {
|
|
41
|
-
external: [
|
|
41
|
+
external: [
|
|
42
|
+
"vue",
|
|
43
|
+
"@abi-software/map-utilities",
|
|
44
|
+
"@element-plus/icons-vue",
|
|
45
|
+
"@abi-software/map-utilities/dist/style.css"
|
|
46
|
+
],
|
|
42
47
|
output: {
|
|
43
48
|
globals: {
|
|
44
49
|
vue: "Vue",
|
|
45
50
|
"@abi-software/map-utilities": "@abi-software/map-utilities",
|
|
46
51
|
"@element-plus/icons-vue": "@element-plus/icons-vue"
|
|
47
52
|
},
|
|
53
|
+
// keep css output name stable for the "./dist/style.css" export/import paths
|
|
54
|
+
assetFileNames: (assetInfo) =>
|
|
55
|
+
assetInfo.name?.endsWith(".css")
|
|
56
|
+
? "style.css"
|
|
57
|
+
: "assets/[name][extname]",
|
|
48
58
|
},
|
|
49
59
|
},
|
|
50
60
|
},
|
|
51
61
|
css: {
|
|
52
62
|
preprocessorOptions: {
|
|
53
63
|
scss: {
|
|
54
|
-
|
|
64
|
+
api: 'modern-compiler',
|
|
65
|
+
additionalData: `@use '@/assets/styles' as *;`
|
|
55
66
|
}
|
|
56
67
|
}
|
|
57
68
|
}
|
|
58
|
-
})
|
|
69
|
+
})
|
package/.eslintrc.js
DELETED