@abi-software/flatmapvuer 1.10.3-beta.6 → 1.10.3-beta.7
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/flatmapvuer.js +1813 -1753
- package/dist/flatmapvuer.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/FlatmapVuer.vue +39 -15
- package/src/components/MultiFlatmapVuer.vue +1 -1
- package/src/components/SelectionsGroup.vue +4 -2
- package/src/components/legends/DynamicLegends.vue +82 -65
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "1.10.3-beta.
|
|
3
|
+
"version": "1.10.3-beta.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"./src/*": "./src/*"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@abi-software/map-utilities": "^1.6.1-beta.
|
|
47
|
+
"@abi-software/map-utilities": "^1.6.1-beta.5",
|
|
48
48
|
"@abi-software/sparc-annotation": "0.3.2",
|
|
49
49
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
50
50
|
"@element-plus/icons-vue": "^2.3.1",
|
|
@@ -260,8 +260,17 @@ Please use `const` to assign meaningful names to them...
|
|
|
260
260
|
:style="{ 'max-height': pathwaysMaxHeight + 'px' }"
|
|
261
261
|
v-popover:checkBoxPopover
|
|
262
262
|
>
|
|
263
|
-
<svg-legends v-if="!isFC" class="svg-legends-container" />
|
|
264
|
-
<
|
|
263
|
+
<!-- <svg-legends v-if="!isFC" class="svg-legends-container" /> -->
|
|
264
|
+
<dynamic-legends
|
|
265
|
+
v-if="!isFC"
|
|
266
|
+
identifierKey="prompt"
|
|
267
|
+
colourKey="colour"
|
|
268
|
+
styleKey="style"
|
|
269
|
+
:legends="flatmapLegends"
|
|
270
|
+
:showStarInLegend="showStarInLegend"
|
|
271
|
+
class="svg-legends-container"
|
|
272
|
+
/>
|
|
273
|
+
<!-- <template v-if="showStarInLegend">
|
|
265
274
|
<el-popover
|
|
266
275
|
content="Location of the featured dataset"
|
|
267
276
|
placement="right"
|
|
@@ -283,7 +292,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
283
292
|
></div>
|
|
284
293
|
</template>
|
|
285
294
|
</el-popover>
|
|
286
|
-
</template>
|
|
295
|
+
</template> -->
|
|
287
296
|
<!-- The line below places the yellowstar svg on the left, and the text "Featured markers on the right" with css so they are both centered in the div -->
|
|
288
297
|
<el-popover
|
|
289
298
|
content="Find these markers for data. The number inside the markers is the number of datasets available for each marker."
|
|
@@ -611,6 +620,7 @@ import SelectionsGroup from './SelectionsGroup.vue'
|
|
|
611
620
|
import { MapSvgIcon, MapSvgSpriteColor } from '@abi-software/svg-sprite'
|
|
612
621
|
import '@abi-software/svg-sprite/dist/style.css'
|
|
613
622
|
import SvgLegends from './legends/SvgLegends.vue'
|
|
623
|
+
import DynamicLegends from './legends/DynamicLegends.vue'
|
|
614
624
|
import {
|
|
615
625
|
ElButton as Button,
|
|
616
626
|
ElCol as Col,
|
|
@@ -640,7 +650,7 @@ import {
|
|
|
640
650
|
import { capitalise } from './utilities.js'
|
|
641
651
|
import yellowstar from '../icons/yellowstar'
|
|
642
652
|
import ResizeSensor from 'css-element-queries/src/ResizeSensor'
|
|
643
|
-
import * as flatmap from 'https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.2.
|
|
653
|
+
import * as flatmap from 'https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.2.10/+esm'
|
|
644
654
|
import { AnnotationService } from '@abi-software/sparc-annotation'
|
|
645
655
|
import { mapState } from 'pinia'
|
|
646
656
|
import { useMainStore } from '@/store/index'
|
|
@@ -1333,6 +1343,13 @@ export default {
|
|
|
1333
1343
|
* @arg {string} `pathId` or `anatomicalId`
|
|
1334
1344
|
*/
|
|
1335
1345
|
retrieveConnectedPaths: async function (payload, options = {}) {
|
|
1346
|
+
// query all connected paths CQ
|
|
1347
|
+
if (this.viewingMode === 'Neuron Connection' && this.connectionType.toLowerCase() === 'all') {
|
|
1348
|
+
const sourceId = this.mapImp.uuid;
|
|
1349
|
+
const connectedPaths = await queryAllConnectedPaths(this.flatmapAPI, sourceId, payload);
|
|
1350
|
+
return connectedPaths;
|
|
1351
|
+
}
|
|
1352
|
+
// query all connected paths from flatmap
|
|
1336
1353
|
if (this.mapImp) {
|
|
1337
1354
|
let connectedPaths = [];
|
|
1338
1355
|
let connectedTarget = options.target?.length ? options.target : [];
|
|
@@ -2102,13 +2119,13 @@ export default {
|
|
|
2102
2119
|
term: this.connectionType
|
|
2103
2120
|
};
|
|
2104
2121
|
// check for existing item
|
|
2105
|
-
const isNewFilterItemExist = this.
|
|
2122
|
+
const isNewFilterItemExist = this.connectivityFilters.some((connectivityfilter) => (
|
|
2106
2123
|
connectivityfilter.facet === newConnectivityfilter.facet &&
|
|
2107
2124
|
connectivityfilter.facetPropPath === newConnectivityfilter.facetPropPath
|
|
2108
2125
|
));
|
|
2109
2126
|
|
|
2110
2127
|
if (!isNewFilterItemExist) {
|
|
2111
|
-
this.
|
|
2128
|
+
this.connectivityFilters.push(newConnectivityfilter);
|
|
2112
2129
|
}
|
|
2113
2130
|
|
|
2114
2131
|
if (this.connectionType.toLowerCase() === 'all') {
|
|
@@ -2119,16 +2136,21 @@ export default {
|
|
|
2119
2136
|
});
|
|
2120
2137
|
} else {
|
|
2121
2138
|
this.$emit('neuron-connection-feature-click', {
|
|
2122
|
-
filters: this.
|
|
2139
|
+
filters: this.connectivityFilters,
|
|
2123
2140
|
search: '',
|
|
2124
2141
|
});
|
|
2125
2142
|
}
|
|
2126
2143
|
} else {
|
|
2144
|
+
// clicking on paths
|
|
2145
|
+
// do nothing for origin, destination, via
|
|
2127
2146
|
const searchTerms = resources.join();
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2147
|
+
|
|
2148
|
+
if (this.connectionType.toLowerCase() === 'all') {
|
|
2149
|
+
this.$emit('neuron-connection-feature-click', {
|
|
2150
|
+
filters: [],
|
|
2151
|
+
search: searchTerms,
|
|
2152
|
+
});
|
|
2153
|
+
}
|
|
2132
2154
|
}
|
|
2133
2155
|
} else {
|
|
2134
2156
|
// load and store knowledge
|
|
@@ -2164,14 +2186,14 @@ export default {
|
|
|
2164
2186
|
*/
|
|
2165
2187
|
updateConnectivityFilters: function (payload) {
|
|
2166
2188
|
if (!payload.length) return;
|
|
2167
|
-
this.
|
|
2189
|
+
this.connectivityFilters = payload.filter((filterItem) => (
|
|
2168
2190
|
filterItem.facet.toLowerCase() !== 'show all'
|
|
2169
2191
|
));
|
|
2170
2192
|
},
|
|
2171
2193
|
resetConnectivityfilters: function (payload) {
|
|
2172
2194
|
if (payload.length) {
|
|
2173
2195
|
// remove not found items
|
|
2174
|
-
this.
|
|
2196
|
+
this.connectivityFilters = this.connectivityFilters.filter((connectivityfilter) =>
|
|
2175
2197
|
payload.some((notFoundItem) => (
|
|
2176
2198
|
notFoundItem.facetPropPath === connectivityfilter.facetPropPath &&
|
|
2177
2199
|
notFoundItem.facet !== connectivityfilter.facet
|
|
@@ -2179,7 +2201,7 @@ export default {
|
|
|
2179
2201
|
)
|
|
2180
2202
|
} else {
|
|
2181
2203
|
// full reset
|
|
2182
|
-
this.
|
|
2204
|
+
this.connectivityFilters = [];
|
|
2183
2205
|
}
|
|
2184
2206
|
},
|
|
2185
2207
|
getKnowledgeTooltip: async function (data) {
|
|
@@ -3032,6 +3054,7 @@ export default {
|
|
|
3032
3054
|
//Async, pass the state for checking
|
|
3033
3055
|
this.processTaxon(this.mapImp.taxonIdentifiers, state ? state['taxonSelection'] : undefined)
|
|
3034
3056
|
this.containsAlert = "alert" in this.mapImp.featureFilterRanges()
|
|
3057
|
+
this.flatmapLegends = this.mapImp.flatmapLegend
|
|
3035
3058
|
this.addResizeButtonToMinimap()
|
|
3036
3059
|
this.loading = false
|
|
3037
3060
|
this.computePathControlsMaximumHeight()
|
|
@@ -3509,7 +3532,8 @@ export default {
|
|
|
3509
3532
|
}),
|
|
3510
3533
|
searchTerm: "",
|
|
3511
3534
|
taxonLeaveDelay: undefined,
|
|
3512
|
-
|
|
3535
|
+
connectivityFilters: [],
|
|
3536
|
+
flatmapLegends: [],
|
|
3513
3537
|
}
|
|
3514
3538
|
},
|
|
3515
3539
|
computed: {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
import { markRaw } from 'vue'
|
|
101
101
|
import EventBus from './EventBus'
|
|
102
102
|
import FlatmapVuer from './FlatmapVuer.vue'
|
|
103
|
-
import * as flatmap from 'https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.2.
|
|
103
|
+
import * as flatmap from 'https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.2.10/+esm'
|
|
104
104
|
import {
|
|
105
105
|
ElCol as Col,
|
|
106
106
|
ElOption as Option,
|
|
@@ -31,10 +31,9 @@
|
|
|
31
31
|
</el-col>
|
|
32
32
|
</el-row>
|
|
33
33
|
<el-checkbox-group
|
|
34
|
-
:class="{ 'show-as-legend': showAsLegend }"
|
|
34
|
+
:class="{ 'show-as-legend': showAsLegend, 'checkbox-group': !showAsLegend }"
|
|
35
35
|
v-model="checkedItems"
|
|
36
36
|
size="small"
|
|
37
|
-
class="checkbox-group"
|
|
38
37
|
@change="handleCheckedItemsChange"
|
|
39
38
|
>
|
|
40
39
|
<div class="checkbox-group-inner">
|
|
@@ -395,5 +394,8 @@ export default {
|
|
|
395
394
|
:deep(.el-checkbox__input) {
|
|
396
395
|
display: none;
|
|
397
396
|
}
|
|
397
|
+
.checkbox-group-inner {
|
|
398
|
+
padding: 5px;
|
|
399
|
+
}
|
|
398
400
|
}
|
|
399
401
|
</style>
|
|
@@ -1,106 +1,123 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
v-
|
|
11
|
-
:
|
|
12
|
-
|
|
13
|
-
>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</el-row>
|
|
2
|
+
<div class="legend-group">
|
|
3
|
+
<div
|
|
4
|
+
class="legend-container"
|
|
5
|
+
v-for="item in legends"
|
|
6
|
+
:key="item[identifierKey]"
|
|
7
|
+
:label="item[identifierKey]"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
v-if="legendStyle(item) === 'yellow-star'"
|
|
11
|
+
:class="legendStyle(item)"
|
|
12
|
+
v-html="showStarInLegend ? yellowstar : ''"
|
|
13
|
+
></div>
|
|
14
|
+
<div v-else class="legend-item">
|
|
15
|
+
<div
|
|
16
|
+
:class="legendStyle(item)"
|
|
17
|
+
:style="{ 'background-color': item[colourKey] }"
|
|
18
|
+
></div>
|
|
19
|
+
<div class="label">{{ capitalise(item[identifierKey]) }}</div>
|
|
20
|
+
</div>
|
|
24
21
|
</div>
|
|
25
22
|
</div>
|
|
26
23
|
</template>
|
|
27
24
|
|
|
28
25
|
<script>
|
|
26
|
+
import yellowstar from "../../icons/yellowstar";
|
|
29
27
|
/* eslint-disable no-alert, no-console */
|
|
30
|
-
import Vue from 'vue'
|
|
31
|
-
import { ElCol as Col, ElRow as Row } from 'element-plus'
|
|
32
|
-
Vue.use(Col)
|
|
33
|
-
Vue.use(Row)
|
|
34
|
-
|
|
35
28
|
export default {
|
|
36
|
-
name:
|
|
29
|
+
name: "DynamicLegends",
|
|
37
30
|
props: {
|
|
38
31
|
identifierKey: {
|
|
39
32
|
type: String,
|
|
40
|
-
default:
|
|
33
|
+
default: "id",
|
|
41
34
|
},
|
|
42
35
|
colourKey: {
|
|
43
36
|
type: String,
|
|
44
|
-
default:
|
|
37
|
+
default: "colour",
|
|
38
|
+
},
|
|
39
|
+
styleKey: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "style",
|
|
45
42
|
},
|
|
46
43
|
title: {
|
|
47
44
|
type: String,
|
|
48
|
-
default:
|
|
45
|
+
default: "",
|
|
49
46
|
},
|
|
50
|
-
|
|
47
|
+
legends: {
|
|
51
48
|
type: Array,
|
|
52
49
|
default: function () {
|
|
53
|
-
return []
|
|
50
|
+
return [];
|
|
54
51
|
},
|
|
55
52
|
},
|
|
53
|
+
showStarInLegend: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
data: function () {
|
|
59
|
+
return {
|
|
60
|
+
yellowstar: yellowstar,
|
|
61
|
+
};
|
|
56
62
|
},
|
|
57
63
|
methods: {
|
|
58
64
|
capitalise: function (label) {
|
|
59
|
-
return label.charAt(0).toUpperCase() + label.slice(1).toLowerCase()
|
|
65
|
+
return label.charAt(0).toUpperCase() + label.slice(1).toLowerCase();
|
|
66
|
+
},
|
|
67
|
+
legendStyle: function (item) {
|
|
68
|
+
if (item[this.styleKey] === "star") {
|
|
69
|
+
if (item[this.identifierKey] === "Featured dataset marker") {
|
|
70
|
+
return "yellow-star";
|
|
71
|
+
} else if (item[this.identifierKey] === "Gaglionated nerve plexus") {
|
|
72
|
+
return "hexagon-star";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return item[this.styleKey];
|
|
60
76
|
},
|
|
61
77
|
},
|
|
62
|
-
}
|
|
78
|
+
};
|
|
63
79
|
</script>
|
|
64
80
|
|
|
65
81
|
<style lang="scss" scoped>
|
|
66
|
-
|
|
82
|
+
.legend-group {
|
|
83
|
+
padding: 6px 0;
|
|
84
|
+
}
|
|
67
85
|
|
|
68
|
-
.
|
|
69
|
-
|
|
70
|
-
width: 11px;
|
|
71
|
-
margin-right: 5px;
|
|
72
|
-
display: inline-block;
|
|
86
|
+
.legend-container {
|
|
87
|
+
width: max-content;
|
|
73
88
|
}
|
|
74
89
|
|
|
75
|
-
.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
font-size: 14px;
|
|
80
|
-
font-weight: normal;
|
|
81
|
-
line-height: 20px;
|
|
82
|
-
margin-left: 8px;
|
|
90
|
+
.legend-item {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
margin: 8px 12.5px;
|
|
83
94
|
}
|
|
84
95
|
|
|
85
|
-
.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
line-height: 14px;
|
|
96
|
+
.circle {
|
|
97
|
+
height: 20px;
|
|
98
|
+
width: 20px;
|
|
99
|
+
background-color: #ffffff;
|
|
100
|
+
border-radius: 50%;
|
|
101
|
+
display: inline-block;
|
|
92
102
|
}
|
|
93
103
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
104
|
+
// hexagon
|
|
105
|
+
.hexagon-star {
|
|
106
|
+
width: 21px;
|
|
107
|
+
height: 25px;
|
|
108
|
+
background-color: #ffffff;
|
|
109
|
+
opacity: 0.64;
|
|
110
|
+
clip-path: path(
|
|
111
|
+
"M10.48 0.76 c-2.12 3.72 -6.12 6.04 -10.44 6.04 l-0.16 0.24 c2.04 3.6 2.04 8 0 11.6 l0.16 0.24 c4.28 0 8.32 2.32 10.44 6.04 c2.12 -3.72 6.12 -6.04 10.44 -6.04 c-2.12 -3.72 -2.12 -8.36 0 -12.16 C16.64 6.84 12.68 4.52 10.48 0.76z"
|
|
112
|
+
);
|
|
113
|
+
-webkit-clip-path: path(
|
|
114
|
+
"M10.48 0.76 c-2.12 3.72 -6.12 6.04 -10.44 6.04 l-0.16 0.24 c2.04 3.6 2.04 8 0 11.6 l0.16 0.24 c4.28 0 8.32 2.32 10.44 6.04 c2.12 -3.72 6.12 -6.04 10.44 -6.04 c-2.12 -3.72 -2.12 -8.36 0 -12.16 C16.64 6.84 12.68 4.52 10.48 0.76z"
|
|
115
|
+
);
|
|
97
116
|
}
|
|
98
117
|
|
|
99
|
-
.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
background: #ffffff;
|
|
104
|
-
padding: 18px;
|
|
118
|
+
.label {
|
|
119
|
+
margin-left: 14px;
|
|
120
|
+
font-size: 12px;
|
|
121
|
+
color: rgb(48, 49, 51);
|
|
105
122
|
}
|
|
106
123
|
</style>
|